Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp339136pxb; Wed, 3 Nov 2021 05:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEIzulcV8qbrY4okOzhzlE2GJIBI5lnTwBWPsUhr2aKnyaMgv4QbJTZqkOvMcnedLF8JU8 X-Received: by 2002:a17:906:e0d5:: with SMTP id gl21mr6412948ejb.421.1635941548395; Wed, 03 Nov 2021 05:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635941548; cv=none; d=google.com; s=arc-20160816; b=ci1TVBnRFrT7jYWco/Y9uPyHE5VWSpuZ1qQ0G19bDMIyDR0DKCMeCTTYz6/x47IjDz 5tJpXkvYPZC5lAzido7pjEZUaaM3yIj+ddlZNCEzm5Qxt+YRlROgXKY/nMdQRcaJw1TA NiieFKp8F9OJCsW6+keUax+LFJE5RQd4R6rw7Nju3yfSWJU6yFI+ghcthqoE05ERnZAE O73FCoSHiEX7R3XjNcM//9WiEG9/tFkij1pIz03KhJFULwd3/NB0JGZhVwF5v+OS0Hft 9plbvvcCBepKohxZMQVKAfOEGW24B5rk27TmWYCSr84sxos66sbZFm6yhLloumTH9zLA BrCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CjPiVZ6CEwcX8p9oXTmszPrcj/hHgUiyD1EHf7MNfJ0=; b=J5QxiwqNM1i5RoEJLYxbW2qfHilf6XQcp6gp94jvQn13dOmU+AdldDEAkmVk4oh6KU NFD9ojW+3rYhXdgirFPQTLxW+GGXAWFc5Nwh6BLLUslaw6mPrlKRp82lzCM+9j0ccz46 4WV/NWyP2TDkwgN6Xw4AgykD99DgJ3F3ShnZ7woWDbIs567E4FfM4GaTEwogGLKU15dk KLDOMIK3kLXCjmZHOOH0lmV47dT73mFTlnXYTcFGJOLHFp4sw1Yq/X7HmlpoD2Jw+mEL IO4r5CsODjSa291V7avV6VOttABL6ccgV+laQN0xFK5KsbdwkRe5ssyB21ow5ifKxmK7 Gu6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XzurOMdd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si3026144edi.550.2021.11.03.05.12.04; Wed, 03 Nov 2021 05:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XzurOMdd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231521AbhKCMML (ORCPT + 99 others); Wed, 3 Nov 2021 08:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbhKCMML (ORCPT ); Wed, 3 Nov 2021 08:12:11 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C29BAC061714; Wed, 3 Nov 2021 05:09:34 -0700 (PDT) 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=CjPiVZ6CEwcX8p9oXTmszPrcj/hHgUiyD1EHf7MNfJ0=; b=XzurOMddznm+TyCj4XwsbSfH2s 1YvfP1uoDLueWcdGH6UKl91Nyt8gDKHB0EJZ9p8GXoSZkeyuoSw8ro4Qpg/tDKhMXt+c9mW+5gvig 1va8ZDP9Nh1ngmnObtCgD9fU47k2fhRPj3dXSX7Q+lTu01AKUdRC9it3Sa+tHTmhK+XCPW1Cv90gO R7V7DN8rv4o6RTbex5YLZcw3/fTiPGmDhJ63Nqpe7IxNAF3+ifnr4KV8D9upZ1LHWc4QF6we1wMvN WLVU2pP8uA+m+xTONlFSZ1fqKx40wQtgin3/iIOHuvwTzaVliOxqefui88Q0pUzR6ZvdAPQHMeiq9 WniQlaUA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1miF4r-0053yg-Mm; Wed, 03 Nov 2021 12:09:13 +0000 Date: Wed, 3 Nov 2021 05:09:13 -0700 From: Luis Chamberlain To: Jens Axboe Cc: Dan Williams , 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> <51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 07:28:02PM -0600, Jens Axboe wrote: > On 11/2/21 6:49 PM, Dan Williams wrote: > > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > >> > >> 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. > > > > True, I don't think I can get it nuked in time, so you can add my > > Reviewed-by for this one. > > Luis, I lost track of the nv* patches from this discussion. If you want > them in 5.16 and they are reviewed, please do resend and I'll pick them > up for the middle-of-merge-window push. Sure thing, I'll resend whatever is left. I also noticed for some reason I forgot to convert nvdimm/pmem and so I'll roll those new patches in, but I suspect that those might be too late unless we get them reviewed in time. Luis