linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* nvme-5.12 is crashing with fabrics discover
@ 2021-02-11 10:28 Sagi Grimberg
  2021-02-11 18:17 ` Chaitanya Kulkarni
  2021-02-11 18:22 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Sagi Grimberg @ 2021-02-11 10:28 UTC (permalink / raw)
  To: linux-nvme, Christoph Hellwig

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.

Trace:
--
[   86.901818] nvme nvme0: new ctrl: NQN 
"nqn.2014-08.org.nvmexpress.discovery", addr 192.168.123.1:8009
[   86.902223] BUG: kernel NULL pointer dereference, address: 
0000000000000368
[   86.903345] #PF: supervisor read access in kernel mode
[   86.904949] #PF: error_code(0x0000) - not-present page
[   86.906202] PGD 0 P4D 0
[   86.907020] Oops: 0000 [#1] SMP PTI
[   86.908025] CPU: 3 PID: 1470 Comm: nvme Tainted: G           OE 
5.11.0-rc5+ #35
[   86.909333] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.14.0-1 04/01/2014
[   86.910924] RIP: 0010:bio_associate_blkg_from_css+0x45/0x140
[   86.912854] Code: 38 f6 c2 03 0f 85 de 00 00 00 65 48 ff 0a e8 12 52 
cb ff 4d 85 e4 74 4d 49 83 bc 24 c0 00 00 00 00 74 42 48 8b 45 08 4c 89 
e7 <48> 8b 80 68 03 00 00 48 8b 70 50 e8 0b fe ff ff 48 89 c3 48 85 c0
[   86.915683] RSP: 0018:ffffbe6c409d3da0 EFLAGS: 00010282
[   86.917316] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 
0000000000000010
[   86.919128] RDX: ffff9e82f3b60000 RSI: ffff9e82f0fdea00 RDI: 
ffff9e82f0fdea00
[   86.919135] RBP: ffff9e82c2769000 R08: 0000000000000001 R09: 
00000000409d3d00
[   86.919137] R10: ffff9e82c2769000 R11: ffff9e82c2769078 R12: 
ffff9e82f0fdea00
[   86.919139] R13: 0000000000000000 R14: ffff9e82c2769000 R15: 
0000000000000000
[   86.919143] FS:  00007fbecaea0780(0000) GS:ffff9e833dd80000(0000) 
knlGS:0000000000000000
[   86.919146] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   86.919149] CR2: 0000000000000368 CR3: 00000000034f6004 CR4: 
0000000000370ee0
[   86.919162] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 
0000000000000000
[   86.919164] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 
0000000000000400
[   86.919169] Call Trace:
[   86.919243]  bio_associate_blkg+0x20/0x70
[   86.923268]  nvme_submit_user_cmd+0xd9/0x260 [nvme_core]
[   86.923391]  nvme_user_cmd+0x11f/0x190 [nvme_core]
--

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-5.12 is crashing with fabrics discover
  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:22 ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-11 18:17 UTC (permalink / raw)
  To: Sagi Grimberg, linux-nvme, Christoph Hellwig

On 2/11/21 2:36 AM, 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.
>
> Trace:
> --
> [   86.901818] nvme nvme0: new ctrl: NQN 
> "nqn.2014-08.org.nvmexpress.discovery", addr 192.168.123.1:8009
> [   86.902223] BUG: kernel NULL pointer dereference, address: 
> 0000000000000368
> [   86.903345] #PF: supervisor read access in kernel mode
> [   86.904949] #PF: error_code(0x0000) - not-present page
> [   86.906202] PGD 0 P4D 0
> [   86.907020] Oops: 0000 [#1] SMP PTI
> [   86.908025] CPU: 3 PID: 1470 Comm: nvme Tainted: G           OE 
> 5.11.0-rc5+ #35
> [   86.909333] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
> 1.14.0-1 04/01/2014
> [   86.910924] RIP: 0010:bio_associate_blkg_from_css+0x45/0x140
> [   86.912854] Code: 38 f6 c2 03 0f 85 de 00 00 00 65 48 ff 0a e8 12 52 
> cb ff 4d 85 e4 74 4d 49 83 bc 24 c0 00 00 00 00 74 42 48 8b 45 08 4c 89 
> e7 <48> 8b 80 68 03 00 00 48 8b 70 50 e8 0b fe ff ff 48 89 c3 48 85 c0
> [   86.915683] RSP: 0018:ffffbe6c409d3da0 EFLAGS: 00010282
> [   86.917316] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 
> 0000000000000010
> [   86.919128] RDX: ffff9e82f3b60000 RSI: ffff9e82f0fdea00 RDI: 
> ffff9e82f0fdea00
> [   86.919135] RBP: ffff9e82c2769000 R08: 0000000000000001 R09: 
> 00000000409d3d00
> [   86.919137] R10: ffff9e82c2769000 R11: ffff9e82c2769078 R12: 
> ffff9e82f0fdea00
> [   86.919139] R13: 0000000000000000 R14: ffff9e82c2769000 R15: 
> 0000000000000000
> [   86.919143] FS:  00007fbecaea0780(0000) GS:ffff9e833dd80000(0000) 
> knlGS:0000000000000000
> [   86.919146] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [   86.919149] CR2: 0000000000000368 CR3: 00000000034f6004 CR4: 
> 0000000000370ee0
> [   86.919162] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 
> 0000000000000000
> [   86.919164] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 
> 0000000000000400
> [   86.919169] Call Trace:
> [   86.919243]  bio_associate_blkg+0x20/0x70
> [   86.923268]  nvme_submit_user_cmd+0xd9/0x260 [nvme_core]
> [   86.923391]  nvme_user_cmd+0x11f/0x190 [nvme_core]
> --
>
>
I think fix for this is present in the linux-block/for-next tree, can
you see if that fixes
your problem ?

commit 59c157433fbc6a7f63f3d708ca2966d0f56bcb7c
Author: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Date:   Tue Jan 26 21:37:38 2021 -0800

    nvme-core: check bdev value for NULL
   




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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-5.12 is crashing with fabrics discover
  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:22 ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2021-02-11 18:22 UTC (permalink / raw)
  To: Sagi Grimberg; +Cc: Christoph Hellwig, linux-nvme

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: nvme-5.12 is crashing with fabrics discover
  2021-02-11 18:17 ` Chaitanya Kulkarni
@ 2021-02-11 18:23   ` Christoph Hellwig
  2021-02-11 18:33     ` Chaitanya Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2021-02-11 18:23 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: Sagi Grimberg, linux-nvme, Christoph Hellwig

On Thu, Feb 11, 2021 at 06:17:56PM +0000, Chaitanya Kulkarni wrote:
> I think fix for this is present in the linux-block/for-next tree, can
> you see if that fixes
> your problem ?

Sorry that I attributed it to Keith in my last mail, this was you.  Looks
like it only made it into Jens' for-5.12/block tree, but not
for-5.12/drivers on which nvme-5.12 is based.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-5.12 is crashing with fabrics discover
  2021-02-11 18:23   ` Christoph Hellwig
@ 2021-02-11 18:33     ` Chaitanya Kulkarni
  0 siblings, 0 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-11 18:33 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, linux-nvme

On 2/11/21 10:24 AM, Christoph Hellwig wrote:
> On Thu, Feb 11, 2021 at 06:17:56PM +0000, Chaitanya Kulkarni wrote:
>> I think fix for this is present in the linux-block/for-next tree, can
>> you see if that fixes
>> your problem ?
> Sorry that I attributed it to Keith in my last mail, this was you.  Looks
> like it only made it into Jens' for-5.12/block tree, but not
> for-5.12/drivers on which nvme-5.12 is based.
>

Saw that, I replied to Sagi's email with that commit, not sure if that got
delivered or not.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-11 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).