From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18067C433EF for ; Tue, 19 Oct 2021 16:08:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A86760F02 for ; Tue, 19 Oct 2021 16:08:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3A86760F02 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HYdvG3wWsz3cT0 for ; Wed, 20 Oct 2021 03:08:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IQEKj74/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=mcgrof@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IQEKj74/; dkim-atps=neutral X-Greylist: delayed 85851 seconds by postgrey-1.36 at boromir; Wed, 20 Oct 2021 03:07:26 AEDT Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HYdtQ5yM4z2yX8 for ; Wed, 20 Oct 2021 03:07:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bjFjn9EzwfzgnYx2Fzb34FQEEM33mz5hXfFo0ZCanZ4=; b=IQEKj74/zEEPLDe45wuoI2G6/s 38JC3s1nDJ9ZkiQqh8uZl5e5cgXZeULOQT6nu900dmgcNqGrLdT4I1AJah4Tb1lnUZmTC4nkWyN60 c6uPfxUWBXcxT8A8FPIBsCqEkEirmG2f5YppFqz05Wj3LTmBvUURDAYdBHNWi50BnZHEHycft05/T HQHYE4XzKPoega0+FLqIInQGy2pQS+daXyT+pw2HZ4rri5+qiL1LnqiRbcMXVZS/QdDGFHJWN1D2O 8WPSgjgB9Sy3pbYvp1RmEgEz9Y3IAbAaaQRDNeaCS8GR7LYKdqQIdwVVJegBXP3vwNv3MiDGsf0zU 4fN/43MQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcrdP-001pUd-Kx; Tue, 19 Oct 2021 16:06:39 +0000 Date: Tue, 19 Oct 2021 09:06:39 -0700 From: Luis Chamberlain To: Dan Williams Subject: Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures Message-ID: References: <20211015235219.2191207-1-mcgrof@kernel.org> <20211015235219.2191207-7-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux NVDIMM , vigneshr@ti.com, linux-nvme@lists.infradead.org, Paul Mackerras , miquel.raynal@bootlin.com, "Weiny, Ira" , Christoph Hellwig , Dave Jiang , Sagi Grimberg , Minchan Kim , Vishal L Verma , Nitin Gupta , linux-block@vger.kernel.org, Keith Busch , Jens Axboe , Geoff Levand , Linux Kernel Mailing List , Jim Paris , senozhatsky@chromium.org, Richard Weinberger , linux-mtd@lists.infradead.org, linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > but that's not correct as we should only call that if we're > > done with device_add_disk(). Fix this by providing unwinding > > prior to the devm call being registered and moving the devm > > registration to the very end. > > > > This should fix calling del_gendisk() if nd_integrity_init() > > fails. I only spotted this issue through code inspection. It > > does not fix any real world bug. > > > > Just fyi, I'm preparing patches to delete this driver completely as it > is unused by any shipping platform. I hope to get that removal into > v5.16. I'll remove this from my queue, any chance you can review the changes for nvdimm/btt? Luis