Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp544747rdb; Thu, 8 Feb 2024 13:29:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlaDb/DBzGYG+5hHiGEyIAU8s7nHGhCcBpm4/Z80Wswlj7R/9L+NJAz9T8/SJKDnovRAZb X-Received: by 2002:a17:906:35d5:b0:a38:8575:2333 with SMTP id p21-20020a17090635d500b00a3885752333mr358550ejb.46.1707427749678; Thu, 08 Feb 2024 13:29:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWoIhLPaJpTh2CsSkbXGb4GoTDMtFlFhlkjnqZGrQDJg4PxgCzZ7h6sgX9WUBgh1QxviyjFcFginaQ3OoXDXxr9KMIKXTNe88Qdf5UdLQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q18-20020a170906361200b00a3bc9cc0c8esi75754ejb.247.2024.02.08.13.29.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 13:29:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F9uPZB2V; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-58720-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58720-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4653F1F228C7 for ; Thu, 8 Feb 2024 21:29:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7BE34F5F1; Thu, 8 Feb 2024 21:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="F9uPZB2V" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05C704C3BF; Thu, 8 Feb 2024 21:28:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427729; cv=fail; b=m44PWlFC7W61yj/QciiWeliFGRdgnUf9oAN0vVs7tF7ceOvblroVxpszWTsxJHYei99i+b2C6yczDHOiZlnOk/DwqrqCyJasWi/88rGJ67pr8x37p4//L/9a9bN17nPVCjlRAD1cyOrn/RTtyLc4D2MMCz/DUmb6fu6SzIzncqw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427729; c=relaxed/simple; bh=F1s8PH8YMB3oMNLCxrRxUr0JZrbaO6ow5MAYrQ9DzXE=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=f3t+brTTgyVF3c/y8uqoH7yr72DhUBwEaW0u+lNcOPOVH5j7Tws/iZADMJG03GUu3YCQ8ndxcXPyDwXPr1FhtQZajp7G94Ln+okXmQqYW/zzS2w994BJe2igduDhnt/44EV7GBw+q/5embpwzR/nhT/5RFvep1Izf00UsAJdcDY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=F9uPZB2V; arc=fail smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707427728; x=1738963728; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=F1s8PH8YMB3oMNLCxrRxUr0JZrbaO6ow5MAYrQ9DzXE=; b=F9uPZB2VZ1hqK76fAMeIZPEvxnda111W2YzRuPW4YRows9dwxm6ENOGZ dQFnFw1JYQUbV8g7//Bm3NRFE6IoEPFkESWqMTA8Ocwaflubqm2vyS8dm uo1d1x22Hyl2K8r2W3Q5egoJuJiKDqrdTFLcnQGJya6fdlnNQ1dgsFoZq 68ehwqqSiJ2q2fpRDvzxhv8/UZeGOw/PaOSoOU2763DT/zwlYa9OJnzhJ gLyXdSVepooXeVAw4YNnHzV1+4OdZhUJ1+0192Wpl9wDQclLRqHJqEBqD Umxv9Q8Ml+NHCt+LH5GE1Lc9puGAL3bG+JgVAnD65F0STKls+ywfoGSAt w==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="1458278" X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="1458278" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 13:28:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="1755595" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Feb 2024 13:28:47 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 13:28:46 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 13:28:45 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 8 Feb 2024 13:28:45 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 8 Feb 2024 13:28:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xp8FTqudCzd5a7cHeEGPxVZ14zFW48jnEk23nTT5/yIW5ecZnNd7ZQZ9pa1Q/DnAhwwMpNNCXukH74ykCD4st7st+6u/fYuaWe7/li2VQSR5s7LZVUYUKj1qnEsIN3ShNO89b5csczUTNWsewdCuKrHn43FkyMPEO6Ef8AsW4dg/ieX+ep/IhqtQ0fRih/mwNrRy1gxOK1M979p/QUBsfyRiMuvAR5rtLz38t+vjhHp3DeDAXtIYsIa5Dump9TZc/NB+anY05hr08ia2YryBgeWvN1wbSzayfJvS41VeaXI4ZisNiWnEMQ4N/ZEImj1NzB+UcdIbyK/fxaCItABF7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bT2AF+C22usOGwrGVRxHRz0iW2nUsy33KTaGSwCK6Jw=; b=jpXqmgtvAOPn8PY8fQEQfqqednOu7HEuqlaZ/TTgGod2yApaonKG8qzR7RaR80jeuLbKzdc2i4sWb2qowfKeJKBu8fl7xJJ8wnUcX0df1yUhsOTf3a5oQrCvowuyKqTefEGlZYEL1j0aImqbWe+1k5+G9ZrbOdG3d43Fb7kNbT5/hyXi8+EN+Q/WAuqbo+sfz74IR72NzUZO4k94pPhjTbhl0p36xjZsHxvtNs0BebU9p1s0VaBcBD4tFfWbutmsh++GUqaLSHlT37I/T8yUmeLkPyKu7BQvBO+kjo4zPQYnUdUZ47xOU5dRKZfpoffH6QfhCwHIlVBlqchUoHqUUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by DM8PR11MB5671.namprd11.prod.outlook.com (2603:10b6:8:3c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38; Thu, 8 Feb 2024 21:28:43 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6257:f90:c7dd:f0b2]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6257:f90:c7dd:f0b2%4]) with mapi id 15.20.7270.024; Thu, 8 Feb 2024 21:28:43 +0000 Date: Thu, 8 Feb 2024 13:28:40 -0800 From: Dan Williams To: Mathieu Desnoyers , Dan Williams , Arnd Bergmann , Dave Chinner CC: , Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Vishal Verma , Dave Jiang , Matthew Wilcox , Russell King , , , , , , , , , Alasdair Kergon , Mike Snitzer , Mikulas Patocka Subject: RE: [PATCH v4 01/12] nvdimm/pmem: Fix leak on dax_add_host() failure Message-ID: <65c54788187c3_afa42949f@dwillia2-xfh.jf.intel.com.notmuch> References: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> <20240208184913.484340-2-mathieu.desnoyers@efficios.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240208184913.484340-2-mathieu.desnoyers@efficios.com> X-ClientProxiedBy: MW4PR04CA0344.namprd04.prod.outlook.com (2603:10b6:303:8a::19) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|DM8PR11MB5671:EE_ X-MS-Office365-Filtering-Correlation-Id: d1b1b247-973f-4081-97b6-08dc28eced26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kMPfH32wYKgexol0IAf+RESArTJ/++jT11rAo3E4cu/S/OsDI/EHe1vmPubxnnRLXg3V48kKF7oEoUAFzAdVYFoDjIbdlRwicIcOFVea2PzpVlzQx2SNX2OmEXiB6tGXa7g8PciaBS/li+JSPpmetQv+cDCuodopRSfo2APktwxXlT/DDo1RvUZKi0tsaXOuDPTsB6J/+EHFEBN6WrfGsD6DYZ3Ibynms/YuPhuKOTHBBCv9R3G4RMl/KEaHCJH/4uJGSa0Zp3bYhClY3emSpDn/fqe6o7QB1AYylR/wbUQNq+o6Spge1qXkgKutQ1WOr4wJ1Xir7WSTDJGByG1aRtFM9ytecj8R3stTczIU7LNVdWh0hvdYW2tHNLEnqJ5g1bH0e4SzAFc5uTPG3fWhOO6YxKBh1O43iaKNEWqHDMOo0ibujR+pRvlHrKDHp6Fv1ek2H382MPg1ank1ULAhYOoD4/7u4HK3gGI/gS4mB2i6or1ZE/ziWPaT2WgFSor3zByahb/rzOMJc+w1r/0Bd0ZUAnWVhv3r88vVBGHDBdAg9oSGhONXLTjOooV+9O8K X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(396003)(346002)(39860400002)(376002)(366004)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(38100700002)(4326008)(82960400001)(8936002)(316002)(66946007)(110136005)(66556008)(8676002)(66476007)(54906003)(4744005)(478600001)(2906002)(5660300002)(6512007)(9686003)(26005)(6486002)(6506007)(7416002)(86362001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?G4TUVmHOeDXU7PbP0JZGMI70g8b1CKrj7X4kGtVCyDTa0tgxpjazmhUHrLvU?= =?us-ascii?Q?pne/L5fwD/R1+2G+8NCN+bGutAxzFTdzGfcYz0HXmKlB4GiYMOGu9UvsJAah?= =?us-ascii?Q?XY+6vUuD1aDLmJfK3ZJsq8D5MDaIxSUefpeSNlpL0F5PcjMUfdWgxKyyjaML?= =?us-ascii?Q?sB9h0oHV6+4vVCCGM1yi42Nw6HPxFXzInVDy8K5q1VtAhYOgx4oFVpKgjghI?= =?us-ascii?Q?4D+7FAXGpduXy2Vt+aDfBGmcSZeH93ip3N4NamBj25/lJfaROyLDtP9pUJND?= =?us-ascii?Q?3i9G36o4t3dGUZlI6mbgRmnwT27856u40VeBV5LXhmnFMMvCW25d7QZt3E56?= =?us-ascii?Q?I8ytUnpHwsP0USyC7r1ft0IIAEvE/8EiBR9hlCvu/EnHYRcscrrEMlaKyXru?= =?us-ascii?Q?oK2tay1zefEb4fIuLJjgMBAS0FHm4KgJHY+Knbt/sHPO9x8gtn2IAqeJRaAt?= =?us-ascii?Q?Bjcn1gba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q4A9NJAc/DEE?= =?us-ascii?Q?uTzodd2dmaVqF0nDKDpGHXyX8ahoWeGcA+7vmdbPKaE224+WIDWktYSJb820?= =?us-ascii?Q?yNHZDvNyn0cN4NcIpNdhiiHB0J7kWPje/yi4XXPaMenG/njYsDs9B6Qk4I+V?= =?us-ascii?Q?rYGGlTgKWAPK1U/3RnbVCoKQvxQnDsv/7n9ilRMoCbYyq7LRxSkhynamOymX?= =?us-ascii?Q?y9coOaSmgVuys+8oN/JTvkniyrTCX0wuyV55XMxcULnxtn6VsUEhcvbX9OE+?= =?us-ascii?Q?Dg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d1b1b247-973f-4081-97b6-08dc28eced26 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 21:28:43.7404 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nHvvtP7JM8WOKGB4Sf/vVazgvsHBPbdD1rf/B/PZ8x7rZoocFFD4eJSBRJlOZzJ0qGD9SejLOb+i5mVEZ1cHqAcLz5+pgxyWEvYWQxgecVI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5671 X-OriginatorOrg: intel.com Mathieu Desnoyers wrote: > Fix a leak on dax_add_host() error, where "goto out_cleanup_dax" is done > before setting pmem->dax_dev, which therefore issues the two following > calls on NULL pointers: > > out_cleanup_dax: > kill_dax(pmem->dax_dev); > put_dax(pmem->dax_dev); > > Signed-off-by: Mathieu Desnoyers Looks good to me. Reviewed-by: Dan Williams