All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: nvme-5.12 is crashing with fabrics discover
Date: Thu, 11 Feb 2021 19:22:27 +0100	[thread overview]
Message-ID: <20210211182227.GA25786@lst.de> (raw)
In-Reply-To: <f4f56a23-c458-5a4c-457d-d9478aea854a@grimberg.me>

On Thu, Feb 11, 2021 at 02:28:32AM -0800, Sagi Grimberg wrote:
> Hey,
>
> Started seeing nvme discovery crashing since commit:
> a7c7f7b2b641 ("nvme: use bio_set_dev to assign ->bi_bdev")
>
> Not yet sure what's going on, but reverting this commit
> makes the issue go away.

The patch below should fix it.  This came up before and I though I had
already queued up a patch from Keith for it, but it looks like it got lost:

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d77f3f26d8d387..4de6a3a135759d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1167,7 +1167,8 @@ static int nvme_submit_user_cmd(struct request_queue *q,
 		if (ret)
 			goto out;
 		bio = req->bio;
-		bio_set_dev(bio, bdev);
+		if (bdev)
+			bio_set_dev(bio, bdev);
 		if (bdev && meta_buffer && meta_len) {
 			meta = nvme_add_user_metadata(bio, meta_buffer, meta_len,
 					meta_seed, write);

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      parent reply	other threads:[~2021-02-11 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 10:28 nvme-5.12 is crashing with fabrics discover Sagi Grimberg
2021-02-11 18:17 ` Chaitanya Kulkarni
2021-02-11 18:23   ` Christoph Hellwig
2021-02-11 18:33     ` Chaitanya Kulkarni
2021-02-11 18:22 ` Christoph Hellwig [this message]

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=20210211182227.GA25786@lst.de \
    --to=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.