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 9C832C433F5 for ; Wed, 3 Nov 2021 00:11:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5DDAF61101 for ; Wed, 3 Nov 2021 00:11:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5DDAF61101 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MJcGzCLePATmYWEPi734oGSv40+iD/n/4W5Vx/6lstQ=; b=DwwMXxnKmd1wVR Z0vK2WiCpCqzbQlxbC0MeoLnXBupGhU3RwhJ4C+Ki3DSZW5sKIw3tqZi+IH8rCKz/UoBijAfAOkC8 kBaMUHSBDTYOnLs7H4tWIiyiCEq/YUWEI/FNSt6AlFil7DjIJ0wev8VBGxoVUaipXAiO4keT1wYhW tCsFXdLU8n9gDuVunYmhfG3Q952uFyEANmgrfYTH5AR/iaYLiXvTu22CTR3yoPKZxqwvRIen+1Oll mGTuvA5pabiYdqcX/phd04uN+fs/KqFveMPRx+kowZ2lh+VaDZ8gy2cJrKRJJAXmzWmP7F8UHTAv5 Pt0fMM2G49nGpg0qE8MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mi3rT-003aJd-6T; Wed, 03 Nov 2021 00:10:39 +0000 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mi3rO-003aHh-An; Wed, 03 Nov 2021 00:10:34 +0000 Date: Tue, 2 Nov 2021 17:10:34 -0700 From: Luis Chamberlain To: Dan Williams Cc: Jens Axboe , Geoff Levand , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jim Paris , Minchan Kim , Nitin Gupta , senozhatsky@chromium.org, Richard Weinberger , miquel.raynal@bootlin.com, vigneshr@ti.com, Vishal L Verma , Dave Jiang , "Weiny, Ira" , Keith Busch , Christoph Hellwig , Sagi Grimberg , linux-block@vger.kernel.org, linuxppc-dev , linux-mtd@lists.infradead.org, Linux NVDIMM , linux-nvme@lists.infradead.org, Linux Kernel Mailing List 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-Disposition: inline In-Reply-To: X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org 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. Curious if are you going to nuking it on v5.16? Otherwise it would stand in the way of the last few patches to add __must_check for the final add_disk() error handling changes. Luis ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/