Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp541345rdb; Thu, 8 Feb 2024 13:21:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVhPyCt5LTPlN22ueL+lRaKqHopu7OkKEEWRwN3DTTBIdCi94lSdufQAncOzyw2S37QPkCxZYiE44vm0Y2ORZ0ySG/ZITxTRg2LL76dMA== X-Google-Smtp-Source: AGHT+IGGBvSb8gh6M4tQP6zcjpRpT2MO4UepJmBR9loZCYIZB7hTPp+NHnA1BLgpaEVNtl3AW7K6 X-Received: by 2002:ac8:5e4d:0:b0:42c:4dfd:1647 with SMTP id i13-20020ac85e4d000000b0042c4dfd1647mr547974qtx.2.1707427293882; Thu, 08 Feb 2024 13:21:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707427293; cv=pass; d=google.com; s=arc-20160816; b=qjcaRX5zJYnDQN90i4ErFIRpWk/oyYitaom0dj/LeAOA+tkQ5LqOMwJo7eSdbTsYOi qOGkqndig2srl+krcgqPAKos9QbQoNbJcGEpLG5SGrCdFvtnVdz5uB3MbtDoONQXmqzk C8KkzEdof3h0Lr+TU3KSejU/CwrXS1fjr6ky+tEn14gUQ+AEWm904+JP8htj5NH5y81k AvTlJlNfRuAkOUIFSCQ34JJbcoRUWAek3+iNNvFYXH6GhspDAAUhIxE+0MqLgSDNfziN BXqgSGwZ41qaZSVtFxSsxCoWfOpCPOsicL5LdrikH1GY731+M4cN/JhxMdu07dxR71Cg G1Hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Ng5LpbnsdP/hc97uslriq/HbSNA1euLNB7WPBI8ZPUE=; fh=G85joYwOs55Cu1iW1brhGEUFzHwJm/hgo+cJd3LIm8k=; b=jhN7+njIqWzuJ+SOjkmyXJ+la7r/KUSCKiCq1GmFtYsOo4jrzypGgOXB1zTPaIgKdA HPI0HbBibsmSQ5ArER2pGQXmCEriAi2Iig5WH5uh8sZO2OH1G+fm/y1tsl0hMytHLEMb nIxNQfC8Pf67MD4yp4SXke787aPgIfQojj4S/dS27T7ljY+l1rPm1pFgWdN1ODwNYbeW 07YYSwJ9mhy3Y6cPJMsSyrJrXSH4tjVSX5JvMGwj5H5pRIy+2gidTOLNdCtC5djmhDzW Nig3XC2sryFalD1HAJ7LqyUGyx2HzHruHpABh7pgwHScO5HkitdCZtvoCWJxnCOV7YzO Wkwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=iTzlcjDx; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-58706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58706-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVMobDecfN4Iy/BCwY2i3Y6MV4SNpPOgLTVWhdFJ7VjF7Nt+6fr6erZvCv3HUIqh0iyDApS4JHJvLm3Q1iZFFz8zEJqYlCbXaeVFwasNg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h4-20020ac85844000000b0042c4dc13047si366601qth.287.2024.02.08.13.21.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 13:21:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=iTzlcjDx; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-58706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58706-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 69E461C2360E for ; Thu, 8 Feb 2024 21:21:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E9E04F1F6; Thu, 8 Feb 2024 21:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="iTzlcjDx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 245C4381D3; Thu, 8 Feb 2024 21:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427274; cv=none; b=oZLB2JNf6HtpyEXurCDWm5wL0UMy71O3oVIdrqBPv/OUG5dOjgdH7uBeLntmZkDaapGBZcpZRHzy44yghna3Gr/CP5ws9F3ESevHQCNFRE1VTrdoIiABkmaSgn1pLiBPvxKXfY3i2KZdBuGabPmmffQoIpL3/NNQ8tqcmtbWjX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427274; c=relaxed/simple; bh=TE6VqizE4efLqCBitG06M/VRnFw1efWMckznBQfEJ1k=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=PXrf5Nz4FP0ig29bAgPdvVwVkPvPgk35WtyCE1mVIMSPKewRNUFvLyIVd9qbwMK25LTj+GS8bKVyGSZwU4KV2ZNd8P1AXQKN8sWvK/Xhktqtmzs7YFzmTl/2OnhQyuSHEYE7ZHh/fVL2G4uH16HfArVCsi4idSeURs+0OAGNfj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=iTzlcjDx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEBB6C433C7; Thu, 8 Feb 2024 21:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1707427273; bh=TE6VqizE4efLqCBitG06M/VRnFw1efWMckznBQfEJ1k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iTzlcjDxZeqzpLgM2c0UDW8zutFRN4NZqOJxe/vrUtVOb0QDld35QCt+eWiNlHKal rin8MDPU0+SovgV8/BHHKMuKlFuhrSakoXhhtMP/YjSVL/NpHL9xNGmg0I9kHVZovM TVqUTU26ZDU8HiClwub6vU1ocBypCHs/iQdkq2dg= Date: Thu, 8 Feb 2024 13:21:12 -0800 From: Andrew Morton To: Mathieu Desnoyers Cc: Dan Williams , Arnd Bergmann , Dave Chinner , linux-kernel@vger.kernel.org, Linus Torvalds , Vishal Verma , Dave Jiang , Matthew Wilcox , Russell King , linux-arch@vger.kernel.org, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@lists.linux.dev, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Mikulas Patocka Subject: Re: [PATCH v4 01/12] nvdimm/pmem: Fix leak on dax_add_host() failure Message-Id: <20240208132112.b5e82e1720e80da195ef0927@linux-foundation.org> In-Reply-To: <20240208184913.484340-2-mathieu.desnoyers@efficios.com> References: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> <20240208184913.484340-2-mathieu.desnoyers@efficios.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 8 Feb 2024 13:49:02 -0500 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); Seems inappropriate that this fix is within this patch series? otoh I assume dax_add_host() has never failed so it doesn't matter much. The series seems useful but is at v4 without much sign of review activity. I think I'll take silence as assent and shall slam it all into -next and see who shouts at me.