All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Dan Williams <dan.j.williams@intel.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: Geoff Levand <geoff@infradead.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Jim Paris <jim@jtan.com>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	senozhatsky@chromium.org, Richard Weinberger <richard@nod.at>,
	miquel.raynal@bootlin.com, vigneshr@ti.com,
	Vishal L Verma <vishal.l.verma@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	"Weiny, Ira" <ira.weiny@intel.com>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-block@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-mtd@lists.infradead.org,
	Linux NVDIMM <nvdimm@lists.linux.dev>,
	linux-nvme@lists.infradead.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures
Date: Tue, 2 Nov 2021 19:28:02 -0600	[thread overview]
Message-ID: <51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk> (raw)
In-Reply-To: <CAPcyv4h1dqBm71OQ_A5Qv4agT3PhV7uoojmSB1pEpS-CXaWb5w@mail.gmail.com>

On 11/2/21 6:49 PM, Dan Williams wrote:
> On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain <mcgrof@kernel.org> 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 <mcgrof@kernel.org> 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.

-- 
Jens Axboe


WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Dan Williams <dan.j.williams@intel.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: Geoff Levand <geoff@infradead.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Jim Paris <jim@jtan.com>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	senozhatsky@chromium.org, Richard Weinberger <richard@nod.at>,
	miquel.raynal@bootlin.com, vigneshr@ti.com,
	Vishal L Verma <vishal.l.verma@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	"Weiny, Ira" <ira.weiny@intel.com>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-block@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-mtd@lists.infradead.org,
	Linux NVDIMM <nvdimm@lists.linux.dev>,
	linux-nvme@lists.infradead.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures
Date: Tue, 2 Nov 2021 19:28:02 -0600	[thread overview]
Message-ID: <51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk> (raw)
In-Reply-To: <CAPcyv4h1dqBm71OQ_A5Qv4agT3PhV7uoojmSB1pEpS-CXaWb5w@mail.gmail.com>

On 11/2/21 6:49 PM, Dan Williams wrote:
> On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain <mcgrof@kernel.org> 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 <mcgrof@kernel.org> 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.

-- 
Jens Axboe


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Dan Williams <dan.j.williams@intel.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: Linux NVDIMM <nvdimm@lists.linux.dev>,
	vigneshr@ti.com, linux-nvme@lists.infradead.org,
	Paul Mackerras <paulus@samba.org>,
	miquel.raynal@bootlin.com, "Weiny, Ira" <ira.weiny@intel.com>,
	Christoph Hellwig <hch@lst.de>, Dave Jiang <dave.jiang@intel.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	Minchan Kim <minchan@kernel.org>,
	Vishal L Verma <vishal.l.verma@intel.com>,
	Nitin Gupta <ngupta@vflare.org>,
	linux-block@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
	Geoff Levand <geoff@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jim Paris <jim@jtan.com>,
	senozhatsky@chromium.org, Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures
Date: Tue, 2 Nov 2021 19:28:02 -0600	[thread overview]
Message-ID: <51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk> (raw)
In-Reply-To: <CAPcyv4h1dqBm71OQ_A5Qv4agT3PhV7uoojmSB1pEpS-CXaWb5w@mail.gmail.com>

On 11/2/21 6:49 PM, Dan Williams wrote:
> On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain <mcgrof@kernel.org> 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 <mcgrof@kernel.org> 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.

-- 
Jens Axboe


  reply	other threads:[~2021-11-03  1:28 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 23:52 [PATCH 00/13] block: add_disk() error handling stragglers Luis Chamberlain
2021-10-15 23:52 ` Luis Chamberlain
2021-10-15 23:52 ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 01/13] block/brd: add error handling support for add_disk() Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 02/13] nvme-multipath: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-16  0:01   ` Keith Busch
2021-10-16  0:01     ` Keith Busch
2021-10-16  0:01     ` Keith Busch
2021-10-16  4:39   ` Christoph Hellwig
2021-10-16  4:39     ` Christoph Hellwig
2021-10-16  4:39     ` Christoph Hellwig
2021-10-18  5:34   ` Chaitanya Kulkarni
2021-10-18  5:34     ` Chaitanya Kulkarni
2021-10-18  5:34     ` Chaitanya Kulkarni
2021-10-15 23:52 ` [PATCH 03/13] nvdimm/btt: do not call del_gendisk() if not needed Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-31 17:47   ` Dan Williams
2021-10-31 17:47     ` Dan Williams
2021-10-31 17:47     ` Dan Williams
2021-11-02 17:03     ` Luis Chamberlain
2021-11-02 17:03       ` Luis Chamberlain
2021-11-02 17:03       ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 04/13] nvdimm/btt: use goto error labels on btt_blk_init() Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-31 17:51   ` Dan Williams
2021-10-31 17:51     ` Dan Williams
2021-10-31 17:51     ` Dan Williams
2021-10-15 23:52 ` [PATCH 05/13] nvdimm/btt: add error handling support for add_disk() Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-16  0:13   ` Dan Williams
2021-10-16  0:13     ` Dan Williams
2021-10-16  0:13     ` Dan Williams
2021-10-19 16:06     ` Luis Chamberlain
2021-10-19 16:06       ` Luis Chamberlain
2021-10-19 16:06       ` Luis Chamberlain
2021-11-03  0:10     ` Luis Chamberlain
2021-11-03  0:10       ` Luis Chamberlain
2021-11-03  0:10       ` Luis Chamberlain
2021-11-03  0:49       ` Dan Williams
2021-11-03  0:49         ` Dan Williams
2021-11-03  0:49         ` Dan Williams
2021-11-03  1:28         ` Jens Axboe [this message]
2021-11-03  1:28           ` Jens Axboe
2021-11-03  1:28           ` Jens Axboe
2021-11-03 12:09           ` Luis Chamberlain
2021-11-03 12:09             ` Luis Chamberlain
2021-11-03 12:09             ` Luis Chamberlain
2021-11-03 12:08         ` Luis Chamberlain
2021-11-03 12:08           ` Luis Chamberlain
2021-11-03 12:08           ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 07/13] nvdimm/blk: add error handling support for add_disk() Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 08/13] zram: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-25 16:55   ` Minchan Kim
2021-10-25 16:55     ` Minchan Kim
2021-10-25 16:55     ` Minchan Kim
2021-10-15 23:52 ` [PATCH 09/13] z2ram: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 10/13] ps3disk: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-29 15:05   ` Geoff Levand
2021-10-29 15:05     ` Geoff Levand
2021-10-29 15:05     ` Geoff Levand
2021-10-15 23:52 ` [PATCH 11/13] ps3vram: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-29 15:09   ` Geoff Levand
2021-10-29 15:09     ` Geoff Levand
2021-10-29 15:09     ` Geoff Levand
2021-10-15 23:52 ` [PATCH 12/13] block/sunvdc: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52 ` [PATCH 13/13] mtd/ubi/block: " Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-15 23:52   ` Luis Chamberlain
2021-10-17 15:26 ` [PATCH 00/13] block: add_disk() error handling stragglers Geoff Levand
2021-10-17 15:26   ` Geoff Levand
2021-10-17 15:26   ` Geoff Levand
2021-10-18 16:15   ` Luis Chamberlain
2021-10-18 16:15     ` Luis Chamberlain
2021-10-18 16:15     ` Luis Chamberlain
2021-10-22  3:10     ` Geoff Levand
2021-10-22  3:10       ` Geoff Levand
2021-10-22  3:10       ` Geoff Levand
2021-10-25 15:58       ` Luis Chamberlain
2021-10-25 15:58         ` Luis Chamberlain
2021-10-25 15:58         ` Luis Chamberlain
2021-10-30 17:03 ` (subset) " Jens Axboe
2021-10-30 17:03   ` Jens Axboe
2021-10-30 17:03   ` Jens Axboe
2021-10-30 17:07 ` Jens Axboe
2021-10-30 17:07   ` Jens Axboe
2021-10-30 17:07   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51f86768-04ca-bc7d-c17c-3d0357d84271@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=geoff@infradead.org \
    --cc=hch@lst.de \
    --cc=ira.weiny@intel.com \
    --cc=jim@jtan.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mcgrof@kernel.org \
    --cc=minchan@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mpe@ellerman.id.au \
    --cc=ngupta@vflare.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=paulus@samba.org \
    --cc=richard@nod.at \
    --cc=sagi@grimberg.me \
    --cc=senozhatsky@chromium.org \
    --cc=vigneshr@ti.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.