From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>, Gerd Bayer <gbayer@linux.ibm.com>
Cc: Jens Axboe <axboe@fb.com>,
Niklas Schnelle <schnelle@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
linux-nvme@lists.infradead.org
Subject: Re: nvme-pci: NULL pointer dereference in nvme_dev_disable() on linux-next
Date: Wed, 9 Nov 2022 04:54:18 +0200 [thread overview]
Message-ID: <65f5d26b-b0af-f9c6-e77c-e82ac969e9f9@grimberg.me> (raw)
In-Reply-To: <20221108074846.GA22674@lst.de>
> Below is the minimal fix. I'll see if I sort out the mess that is
> probe/reset failure vs ->remove a bit better, though.
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index f94b05c585cbc..577bacdcfee08 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -5160,6 +5160,8 @@ EXPORT_SYMBOL_GPL(nvme_start_freeze);
>
> void nvme_stop_queues(struct nvme_ctrl *ctrl)
> {
> + if (!ctrl->tagset)
> + return;
> if (!test_and_set_bit(NVME_CTRL_STOPPED, &ctrl->flags))
> blk_mq_quiesce_tagset(ctrl->tagset);
> else
> @@ -5169,6 +5171,8 @@ EXPORT_SYMBOL_GPL(nvme_stop_queues);
>
> void nvme_start_queues(struct nvme_ctrl *ctrl)
> {
> + if (!ctrl->tagset)
> + return;
> if (test_and_clear_bit(NVME_CTRL_STOPPED, &ctrl->flags))
> blk_mq_unquiesce_tagset(ctrl->tagset);
> }
Can we do that in the pci driver and not here?
next prev parent reply other threads:[~2022-11-09 2:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 17:28 Gerd Bayer
2022-11-08 3:50 ` Chaitanya Kulkarni
2022-11-08 15:46 ` Keith Busch
2022-11-08 7:48 ` Christoph Hellwig
2022-11-08 17:11 ` Gerd Bayer
2022-11-08 17:23 ` Keith Busch
2022-11-09 6:20 ` Christoph Hellwig
2022-11-09 2:54 ` Sagi Grimberg [this message]
2022-11-09 7:41 ` Chao Leng
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=65f5d26b-b0af-f9c6-e77c-e82ac969e9f9@grimberg.me \
--to=sagi@grimberg.me \
--cc=axboe@fb.com \
--cc=gbayer@linux.ibm.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=schnelle@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®