Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port

From: Hillf Danton

Date: Mon Oct 12 2026 - 04:00:55 EST


> Date: Sun, 11 Oct 2026 10:32:37 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: a5ebb76233b7 Merge tag 'edac_urgent_for_v7.3_rc7' of git:/..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1494923e580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=df4bbab1c2172b9f
> dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=126a0f15580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=166a0f15580000

#syz test

--- x/drivers/nvme/target/fc.c
+++ y/drivers/nvme/target/fc.c
@@ -1273,7 +1273,14 @@ nvmet_fc_portentry_unbind(struct nvmet_f
{
unsigned long flags;

+ if (!pe->port)
+ return;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
+ if (!pe->port) {
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+ return;
+ }
+ pe->port = NULL;
if (pe->tgtport) {
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
--