* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
@ 2026-10-12 5:11 ` Hillf Danton
2026-10-12 5:50 ` syzbot
2026-10-12 7:58 ` Hillf Danton
` (7 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-12 5:11 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -1278,7 +1278,6 @@ nvmet_fc_portentry_unbind(struct nvmet_f
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
}
- list_del(&pe->pe_list);
spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
}
@@ -2922,6 +2921,7 @@ nvmet_fc_remove_port(struct nvmet_port *
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
if (pe->tgtport && nvmet_fc_tgtport_get(pe->tgtport))
tgtport = pe->tgtport;
+ list_del(&pe->pe_list);
spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
nvmet_fc_portentry_unbind(pe);
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-12 5:11 ` Hillf Danton
@ 2026-10-12 5:50 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-12 5:50 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in nvmet_fc_remove_port
non-slab/vmalloc memory
list_del corruption. prev->next should be ffff8880387ec820, but was 0000000000000000. (prev=ffffffff9aecd340)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 6847 Comm: syz.0.45 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0018:ffffc90004f8fc30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff8880387ec820 RCX: 4b2bacb912474a00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e800 R15: ffffffff9aecd340
FS: 00007f415b0fd6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa587c4b8c0 CR3: 0000000037614000 CR4: 00000000003526f0
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:140 [inline]
__list_del_entry include/linux/list.h:261 [inline]
list_del include/linux/list.h:275 [inline]
nvmet_fc_remove_port+0xbc/0x340 drivers/nvme/target/fc.c:2924
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5678
filename_unlinkat+0x3d3/0x610 fs/namei.c:5748
__do_sys_unlinkat fs/namei.c:5777 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5769
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f415babe1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f415b0fd028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f415bd46090 RCX: 00007f415babe1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f415bb55888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f415bd46128 R14: 00007f415bd46090 R15: 00007ffda341e7e8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0018:ffffc90004f8fc30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff8880387ec820 RCX: 4b2bacb912474a00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e800 R15: ffffffff9aecd340
FS: 00007f415b0fd6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa587c4b8c0 CR3: 0000000037614000 CR4: 00000000003526f0
Tested on:
commit: 24a19b95 Linux 7.3-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=160b540d580000
kernel config: https://syzkaller.appspot.com/x/.config?x=df4bbab1c2172b9f
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=1493540d580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
2026-10-12 5:11 ` Hillf Danton
@ 2026-10-12 7:58 ` Hillf Danton
2026-10-12 8:25 ` syzbot
2026-10-12 10:33 ` Hillf Danton
` (6 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-12 7:58 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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;
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-12 7:58 ` Hillf Danton
@ 2026-10-12 8:25 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-12 8:25 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in nvmet_fc_remove_port
non-slab/vmalloc memory
list_del corruption. prev->next should be ffff88805f6be020, but was 0000000000000000. (prev=ffffffff9aecd340)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 6706 Comm: syz.1.55 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0018:ffffc90005077c38 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88805f6be020 RCX: 3022935dcdf04700
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e840 R15: ffffffff9aecd340
FS: 00007f556375d6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcf66ae41d8 CR3: 0000000035112000 CR4: 00000000003526f0
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:140 [inline]
__list_del_entry include/linux/list.h:261 [inline]
list_del include/linux/list.h:275 [inline]
nvmet_fc_portentry_unbind drivers/nvme/target/fc.c:1288 [inline]
nvmet_fc_remove_port+0x1fb/0x380 drivers/nvme/target/fc.c:2934
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5678
filename_unlinkat+0x3d3/0x610 fs/namei.c:5748
__do_sys_unlinkat fs/namei.c:5777 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5769
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f556411e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f556375d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f55643a6090 RCX: 00007f556411e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f55641b5888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f55643a6128 R14: 00007f55643a6090 R15: 00007ffde0760588
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0018:ffffc90005077c38 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88805f6be020 RCX: 3022935dcdf04700
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e840 R15: ffffffff9aecd340
FS: 00007f556375d6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcf66c6f040 CR3: 0000000035112000 CR4: 00000000003526f0
Tested on:
commit: 24a19b95 Linux 7.3-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17e825d1580000
kernel config: https://syzkaller.appspot.com/x/.config?x=df4bbab1c2172b9f
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=12c690a5580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
2026-10-12 5:11 ` Hillf Danton
2026-10-12 7:58 ` Hillf Danton
@ 2026-10-12 10:33 ` Hillf Danton
2026-10-12 11:01 ` syzbot
2026-10-12 12:41 ` Hillf Danton
` (5 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-12 10:33 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -2915,23 +2915,26 @@ nvmet_fc_add_port(struct nvmet_port *por
static void
nvmet_fc_remove_port(struct nvmet_port *port)
{
- struct nvmet_fc_port_entry *pe = port->priv;
+ struct nvmet_fc_port_entry *pe;
struct nvmet_fc_tgtport *tgtport = NULL;
unsigned long flags;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
- if (pe->tgtport && nvmet_fc_tgtport_get(pe->tgtport))
+ pe = port->priv;
+ port->priv = NULL;
+ if (pe && pe->tgtport && nvmet_fc_tgtport_get(pe->tgtport))
tgtport = pe->tgtport;
spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
- nvmet_fc_portentry_unbind(pe);
-
if (tgtport) {
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
nvmet_fc_tgtport_put(tgtport);
}
+ if (!pe)
+ return;
+ nvmet_fc_portentry_unbind(pe);
kfree(pe);
}
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-12 10:33 ` Hillf Danton
@ 2026-10-12 11:01 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-12 11:01 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: user-memory-access Read in nvmet_fc_tgt_a_get
=========
==================================================================
BUG: KASAN: user-memory-access in instrument_atomic_read include/linux/instrumented.h:82 [inline]
BUG: KASAN: user-memory-access in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: user-memory-access in refcount_read include/linux/refcount.h:170 [inline]
BUG: KASAN: user-memory-access in __refcount_add_not_zero include/linux/refcount.h:176 [inline]
BUG: KASAN: user-memory-access in __refcount_inc_not_zero include/linux/refcount.h:317 [inline]
BUG: KASAN: user-memory-access in refcount_inc_not_zero include/linux/refcount.h:335 [inline]
BUG: KASAN: user-memory-access in kref_get_unless_zero include/linux/kref.h:133 [inline]
BUG: KASAN: user-memory-access in nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
Read of size 4 at addr 000000000008c617 by task syz.1.88/6756
CPU: 0 UID: 0 PID: 6756 Comm: syz.1.88 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
instrument_atomic_read include/linux/instrumented.h:82 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
refcount_read include/linux/refcount.h:170 [inline]
__refcount_add_not_zero include/linux/refcount.h:176 [inline]
__refcount_inc_not_zero include/linux/refcount.h:317 [inline]
refcount_inc_not_zero include/linux/refcount.h:335 [inline]
kref_get_unless_zero include/linux/kref.h:133 [inline]
nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
__nvmet_fc_free_assocs+0x10c/0x380 drivers/nvme/target/fc.c:1480
nvmet_fc_remove_port+0xc5/0x350 drivers/nvme/target/fc.c:2931
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5678
filename_unlinkat+0x3d3/0x610 fs/namei.c:5748
__do_sys_unlinkat fs/namei.c:5777 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5769
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd82566e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd824cad028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007fd8258f6090 RCX: 00007fd82566e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007fd825705888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd8258f6128 R14: 00007fd8258f6090 R15: 00007ffe18669a38
</TASK>
==================================================================
Tested on:
commit: 24a19b95 Linux 7.3-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1710023e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=df4bbab1c2172b9f
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=1432149c580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (2 preceding siblings ...)
2026-10-12 10:33 ` Hillf Danton
@ 2026-10-12 12:41 ` Hillf Danton
2026-10-12 13:11 ` syzbot
2026-10-17 2:09 ` Hillf Danton
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-12 12:41 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -1620,6 +1620,7 @@ nvmet_fc_free_pending_reqs(struct nvmet_
}
}
+static DEFINE_MUTEX(tgtp_mutex);
/**
* nvmet_fc_unregister_targetport - transport entry point called by an
* LLDD to deregister/remove a previously
@@ -1637,6 +1638,7 @@ nvmet_fc_unregister_targetport(struct nv
struct nvmet_fc_tgtport *tgtport = targetport_to_tgtport(target_port);
unsigned long flags;
+ mutex_lock(&tgtp_mutex);
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
list_del(&tgtport->tgt_list);
spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
@@ -1645,6 +1647,7 @@ nvmet_fc_unregister_targetport(struct nv
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ mutex_unlock(&tgtp_mutex);
flush_workqueue(nvmet_wq);
@@ -2919,6 +2922,7 @@ nvmet_fc_remove_port(struct nvmet_port *
struct nvmet_fc_tgtport *tgtport = NULL;
unsigned long flags;
+ mutex_lock(&tgtp_mutex);
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
if (pe->tgtport && nvmet_fc_tgtport_get(pe->tgtport))
tgtport = pe->tgtport;
@@ -2933,6 +2937,7 @@ nvmet_fc_remove_port(struct nvmet_port *
}
kfree(pe);
+ mutex_unlock(&tgtp_mutex);
}
static void
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-12 12:41 ` Hillf Danton
@ 2026-10-12 13:11 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-12 13:11 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in nvmet_fc_remove_port
non-slab/vmalloc memory
list_del corruption. prev->next should be ffff888042a5f220, but was 0000000000000000. (prev=ffffffff9aecd340)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 6805 Comm: syz.2.84 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0000:ffffc90005157c30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff888042a5f220 RCX: 112f50d9f18e7400
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e820 R15: ffffffff9aecd340
FS: 00007f076720d6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564cae572950 CR3: 00000000361dc000 CR4: 00000000003526f0
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:140 [inline]
__list_del_entry include/linux/list.h:261 [inline]
list_del include/linux/list.h:275 [inline]
nvmet_fc_portentry_unbind drivers/nvme/target/fc.c:1281 [inline]
nvmet_fc_remove_port+0x179/0x340 drivers/nvme/target/fc.c:2931
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5678
filename_unlinkat+0x3d3/0x610 fs/namei.c:5748
__do_sys_unlinkat fs/namei.c:5777 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5769
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0767bce1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f076720d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f0767e56090 RCX: 00007f0767bce1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f0767c65888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0767e56128 R14: 00007f0767e56090 R15: 00007ffc73e653d8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 8b f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4c bf 58 fd 49 8b 17 48 c7 c7 40 6e cc 8b 48 89 de 4c 89 f9 e8 27 88 4c fc 90 <0f> 0b 4c 89 f7 e8 5c f8 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 1d
RSP: 0000:ffffc90005157c30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff888042a5f220 RCX: 112f50d9f18e7400
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101708490b R12: 1ffffffff35d9a68
R13: dffffc0000000000 R14: ffffffff85f7e820 R15: ffffffff9aecd340
FS: 00007f076720d6c0(0000) GS:ffff8881249bb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564cae572950 CR3: 00000000361dc000 CR4: 00000000003526f0
Tested on:
commit: 24a19b95 Linux 7.3-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=131aa9c9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=df4bbab1c2172b9f
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=10728f15580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (3 preceding siblings ...)
2026-10-12 12:41 ` Hillf Danton
@ 2026-10-17 2:09 ` Hillf Danton
2026-10-17 2:50 ` syzbot
2026-10-17 4:50 ` Nhật Anh Nguyễn Duy
2026-10-17 4:41 ` Hillf Danton
` (3 subsequent siblings)
8 siblings, 2 replies; 20+ messages in thread
From: Hillf Danton @ 2026-10-17 2:09 UTC (permalink / raw)
To: syzbot; +Cc: Nguyen Duy Nhat Anh, linux-kernel, syzkaller-bugs
> 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
Test Nguyen's idea.
#syz test
--- x/drivers/nvme/target/fc.c
+++ y/drivers/nvme/target/fc.c
@@ -1319,12 +1319,13 @@ nvmet_fc_portentry_rebind_tgt(struct nvm
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
list_for_each_entry(pe, &nvmet_fc_portentry_list, pe_list) {
+ if (pe->tgtport)
+ continue;
if (tgtport->fc_target_port.node_name == pe->node_name &&
tgtport->fc_target_port.port_name == pe->port_name) {
if (!nvmet_fc_tgtport_get(tgtport))
- continue;
+ break;
- WARN_ON(pe->tgtport);
tgtport->pe = pe;
pe->tgtport = tgtport;
break;
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 2:09 ` Hillf Danton
@ 2026-10-17 2:50 ` syzbot
2026-10-17 4:50 ` Nhật Anh Nguyễn Duy
1 sibling, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-17 2:50 UTC (permalink / raw)
To: hdanton, linux-kernel, neganhat, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in nvmet_fc_remove_port
non-slab/vmalloc memory
list_del corruption. prev->next should be ffff88802b1c4020, but was 0000000000000000. (prev=ffffffff9aecd380)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 6659 Comm: syz.1.38 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 fb f0 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 bc b7 58 fd 49 8b 17 48 c7 c7 40 6f cc 8b 48 89 de 4c 89 f9 e8 e7 82 4c fc 90 <0f> 0b 4c 89 f7 e8 cc f0 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 8d
RSP: 0018:ffffc90004f07c30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88802b1c4020 RCX: 1c46e68f21e3c500
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed10170a490b R12: 1ffffffff35d9a70
R13: dffffc0000000000 R14: ffffffff85f7f100 R15: ffffffff9aecd380
FS: 00007fccc25bd6c0(0000) GS:ffff888124abb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbda5aaf000 CR3: 000000002c6f4000 CR4: 00000000003526f0
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:140 [inline]
__list_del_entry include/linux/list.h:261 [inline]
list_del include/linux/list.h:275 [inline]
nvmet_fc_portentry_unbind drivers/nvme/target/fc.c:1281 [inline]
nvmet_fc_remove_port+0x16b/0x320 drivers/nvme/target/fc.c:2928
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fccc2f7e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fccc25bd028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007fccc3206090 RCX: 00007fccc2f7e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007fccc3015888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fccc3206128 R14: 00007fccc3206090 R15: 00007ffcdc929c08
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 fb f0 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 bc b7 58 fd 49 8b 17 48 c7 c7 40 6f cc 8b 48 89 de 4c 89 f9 e8 e7 82 4c fc 90 <0f> 0b 4c 89 f7 e8 cc f0 37 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 8d
RSP: 0018:ffffc90004f07c30 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88802b1c4020 RCX: 1c46e68f21e3c500
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000201 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed10170a490b R12: 1ffffffff35d9a70
R13: dffffc0000000000 R14: ffffffff85f7f100 R15: ffffffff9aecd380
FS: 00007fccc25bd6c0(0000) GS:ffff888124abb000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbda5aaf000 CR3: 000000002c6f4000 CR4: 00000000003526f0
Tested on:
commit: 58161ead Merge tag 'drm-fixes-2026-10-17' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=179ce895580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=13ea960d580000
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 2:09 ` Hillf Danton
2026-10-17 2:50 ` syzbot
@ 2026-10-17 4:50 ` Nhật Anh Nguyễn Duy
1 sibling, 0 replies; 20+ messages in thread
From: Nhật Anh Nguyễn Duy @ 2026-10-17 4:50 UTC (permalink / raw)
To: Hillf Danton; +Cc: syzbot, linux-kernel, syzkaller-bugs
On Sat, Oct 17, 2026 at 9:09 AM Hillf Danton <hdanton@sina.com> wrote:
>
> > 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
>
> Test Nguyen's idea.
>
> #syz test
>
> --- x/drivers/nvme/target/fc.c
> +++ y/drivers/nvme/target/fc.c
> @@ -1319,12 +1319,13 @@ nvmet_fc_portentry_rebind_tgt(struct nvm
>
> spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
> list_for_each_entry(pe, &nvmet_fc_portentry_list, pe_list) {
> + if (pe->tgtport)
> + continue;
> if (tgtport->fc_target_port.node_name == pe->node_name &&
> tgtport->fc_target_port.port_name == pe->port_name) {
> if (!nvmet_fc_tgtport_get(tgtport))
> - continue;
> + break;
>
> - WARN_ON(pe->tgtport);
> tgtport->pe = pe;
> pe->tgtport = tgtport;
> break;
> --
[Resending to list + CCs — accidentally dropped them in my previous
reply, apologies]
You may need to recheck the commit you're testing
on because #syz test or #syz test: upstream master runs on the latest
commit of the repository. Something like #syz test: upstream [commit]
would let the bot test it on the specific commit the bug was
discovered in.
Best regards,
Nhat Anh
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (4 preceding siblings ...)
2026-10-17 2:09 ` Hillf Danton
@ 2026-10-17 4:41 ` Hillf Danton
2026-10-17 5:12 ` syzbot
2026-10-17 5:42 ` Hillf Danton
` (2 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-17 4:41 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -1271,9 +1271,17 @@ nvmet_fc_portentry_bind(struct nvmet_fc_
static void
nvmet_fc_portentry_unbind(struct nvmet_fc_port_entry *pe)
{
+ struct nvmet_fc_port_entry *entry;
unsigned long flags;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
+ list_for_each_entry(entry, &nvmet_fc_portentry_list, pe_list) {
+ if (entry == pe)
+ goto out;
+ }
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+ return;
+out:
if (pe->tgtport) {
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 4:41 ` Hillf Danton
@ 2026-10-17 5:12 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-17 5:12 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: user-memory-access Read in nvmet_fc_tgt_a_get
==================================================================
BUG: KASAN: user-memory-access in instrument_atomic_read include/linux/instrumented.h:82 [inline]
BUG: KASAN: user-memory-access in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: user-memory-access in refcount_read include/linux/refcount.h:170 [inline]
BUG: KASAN: user-memory-access in __refcount_add_not_zero include/linux/refcount.h:176 [inline]
BUG: KASAN: user-memory-access in __refcount_inc_not_zero include/linux/refcount.h:317 [inline]
BUG: KASAN: user-memory-access in refcount_inc_not_zero include/linux/refcount.h:335 [inline]
BUG: KASAN: user-memory-access in kref_get_unless_zero include/linux/kref.h:133 [inline]
BUG: KASAN: user-memory-access in nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
Read of size 4 at addr 000000000008c617 by task syz.2.87/6911
CPU: 1 UID: 0 PID: 6911 Comm: syz.2.87 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
instrument_atomic_read include/linux/instrumented.h:82 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
refcount_read include/linux/refcount.h:170 [inline]
__refcount_add_not_zero include/linux/refcount.h:176 [inline]
__refcount_inc_not_zero include/linux/refcount.h:317 [inline]
refcount_inc_not_zero include/linux/refcount.h:335 [inline]
kref_get_unless_zero include/linux/kref.h:133 [inline]
nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
__nvmet_fc_free_assocs+0x10c/0x380 drivers/nvme/target/fc.c:1488
nvmet_fc_remove_port+0x2a5/0x350 drivers/nvme/target/fc.c:2939
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1994b5e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f199419d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f1994de6090 RCX: 00007f1994b5e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f1994bf5888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1994de6128 R14: 00007f1994de6090 R15: 00007ffcd30e9a38
</TASK>
==================================================================
Tested on:
commit: 58161ead Merge tag 'drm-fixes-2026-10-17' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1492efd1580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=15d8320d580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (5 preceding siblings ...)
2026-10-17 4:41 ` Hillf Danton
@ 2026-10-17 5:42 ` Hillf Danton
2026-10-17 6:53 ` syzbot
2026-10-17 7:30 ` Hillf Danton
2026-10-17 9:20 ` Hillf Danton
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-17 5:42 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -1271,9 +1271,17 @@ nvmet_fc_portentry_bind(struct nvmet_fc_
static void
nvmet_fc_portentry_unbind(struct nvmet_fc_port_entry *pe)
{
+ struct nvmet_fc_port_entry *entry;
unsigned long flags;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
+ list_for_each_entry(entry, &nvmet_fc_portentry_list, pe_list) {
+ if (entry == pe)
+ goto out;
+ }
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+ return;
+out:
if (pe->tgtport) {
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
@@ -1643,8 +1651,10 @@ nvmet_fc_unregister_targetport(struct nv
nvmet_fc_portentry_unbind_tgt(tgtport);
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
flush_workqueue(nvmet_wq);
@@ -2927,8 +2937,10 @@ nvmet_fc_remove_port(struct nvmet_port *
nvmet_fc_portentry_unbind(pe);
if (tgtport) {
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
nvmet_fc_tgtport_put(tgtport);
}
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 5:42 ` Hillf Danton
@ 2026-10-17 6:53 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-17 6:53 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: user-memory-access Read in nvmet_fc_tgt_a_get
==================================================================
BUG: KASAN: user-memory-access in instrument_atomic_read include/linux/instrumented.h:82 [inline]
BUG: KASAN: user-memory-access in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: user-memory-access in refcount_read include/linux/refcount.h:170 [inline]
BUG: KASAN: user-memory-access in __refcount_add_not_zero include/linux/refcount.h:176 [inline]
BUG: KASAN: user-memory-access in __refcount_inc_not_zero include/linux/refcount.h:317 [inline]
BUG: KASAN: user-memory-access in refcount_inc_not_zero include/linux/refcount.h:335 [inline]
BUG: KASAN: user-memory-access in kref_get_unless_zero include/linux/kref.h:133 [inline]
BUG: KASAN: user-memory-access in nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
Read of size 4 at addr 000000000008c617 by task syz.2.58/6775
CPU: 1 UID: 0 PID: 6775 Comm: syz.2.58 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
instrument_atomic_read include/linux/instrumented.h:82 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
refcount_read include/linux/refcount.h:170 [inline]
__refcount_add_not_zero include/linux/refcount.h:176 [inline]
__refcount_inc_not_zero include/linux/refcount.h:317 [inline]
refcount_inc_not_zero include/linux/refcount.h:335 [inline]
kref_get_unless_zero include/linux/kref.h:133 [inline]
nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1201
__nvmet_fc_free_assocs+0x10c/0x380 drivers/nvme/target/fc.c:1488
nvmet_fc_remove_port+0x2b1/0x360 drivers/nvme/target/fc.c:2942
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fedc366e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fedc2cad028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007fedc38f6090 RCX: 00007fedc366e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007fedc3705888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fedc38f6128 R14: 00007fedc38f6090 R15: 00007ffd3089d1a8
</TASK>
==================================================================
Tested on:
commit: 58161ead Merge tag 'drm-fixes-2026-10-17' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14e66ce1580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=175d34e1580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (6 preceding siblings ...)
2026-10-17 5:42 ` Hillf Danton
@ 2026-10-17 7:30 ` Hillf Danton
2026-10-17 7:55 ` syzbot
2026-10-17 9:20 ` Hillf Danton
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-17 7:30 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -113,6 +113,7 @@ struct nvmet_fc_tgtport {
struct nvmet_fc_port_entry *pe;
struct kref ref;
u32 max_sg_cnt;
+ int assoc_freed;
};
struct nvmet_fc_port_entry {
@@ -1271,9 +1272,17 @@ nvmet_fc_portentry_bind(struct nvmet_fc_
static void
nvmet_fc_portentry_unbind(struct nvmet_fc_port_entry *pe)
{
+ struct nvmet_fc_port_entry *entry;
unsigned long flags;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
+ list_for_each_entry(entry, &nvmet_fc_portentry_list, pe_list) {
+ if (entry == pe)
+ goto out;
+ }
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+ return;
+out:
if (pe->tgtport) {
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
@@ -1475,6 +1484,9 @@ __nvmet_fc_free_assocs(struct nvmet_fc_t
{
struct nvmet_fc_tgt_assoc *assoc;
+ if (tgtport->assoc_freed)
+ return;
+ tgtport->assoc_freed = 1;
rcu_read_lock();
list_for_each_entry_rcu(assoc, &tgtport->assoc_list, a_list) {
if (!nvmet_fc_tgt_a_get(assoc))
@@ -1643,8 +1655,10 @@ nvmet_fc_unregister_targetport(struct nv
nvmet_fc_portentry_unbind_tgt(tgtport);
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
flush_workqueue(nvmet_wq);
@@ -2927,8 +2941,10 @@ nvmet_fc_remove_port(struct nvmet_port *
nvmet_fc_portentry_unbind(pe);
if (tgtport) {
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
nvmet_fc_tgtport_put(tgtport);
}
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 7:30 ` Hillf Danton
@ 2026-10-17 7:55 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-17 7:55 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: user-memory-access Read in nvmet_fc_tgt_a_get
==================================================================
BUG: KASAN: user-memory-access in instrument_atomic_read include/linux/instrumented.h:82 [inline]
BUG: KASAN: user-memory-access in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: user-memory-access in refcount_read include/linux/refcount.h:170 [inline]
BUG: KASAN: user-memory-access in __refcount_add_not_zero include/linux/refcount.h:176 [inline]
BUG: KASAN: user-memory-access in __refcount_inc_not_zero include/linux/refcount.h:317 [inline]
BUG: KASAN: user-memory-access in refcount_inc_not_zero include/linux/refcount.h:335 [inline]
BUG: KASAN: user-memory-access in kref_get_unless_zero include/linux/kref.h:133 [inline]
BUG: KASAN: user-memory-access in nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1202
Read of size 4 at addr 000000000008c617 by task syz.3.43/6693
CPU: 1 UID: 0 PID: 6693 Comm: syz.3.43 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Goo
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
instrument_atomic_read include/linux/instrumented.h:82 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
refcount_read include/linux/refcount.h:170 [inline]
__refcount_add_not_zero include/linux/refcount.h:176 [inline]
__refcount_inc_not_zero include/linux/refcount.h:317 [inline]
refcount_inc_not_zero include/linux/refcount.h:335 [inline]
kref_get_unless_zero include/linux/kref.h:133 [inline]
nvmet_fc_tgt_a_get+0x82/0x1d0 drivers/nvme/target/fc.c:1202
__nvmet_fc_free_assocs+0x15a/0x410 drivers/nvme/target/fc.c:1492
nvmet_fc_remove_port+0x2b1/0x360 drivers/nvme/target/fc.c:2946
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbccffce1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbccf60d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007fbcd0256090 RCX: 00007fbccffce1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007fbcd0065888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbcd0256128 R14: 00007fbcd0256090 R15: 00007fffd68320f8
</TASK>
==================================================================
Tested on:
commit: 58161ead Merge tag 'drm-fixes-2026-10-17' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16ac320d580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=15740f01580000
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-11 17:32 [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port syzbot
` (7 preceding siblings ...)
2026-10-17 7:30 ` Hillf Danton
@ 2026-10-17 9:20 ` Hillf Danton
2026-10-17 10:30 ` syzbot
8 siblings, 1 reply; 20+ messages in thread
From: Hillf Danton @ 2026-10-17 9:20 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
> 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
@@ -113,6 +113,7 @@ struct nvmet_fc_tgtport {
struct nvmet_fc_port_entry *pe;
struct kref ref;
u32 max_sg_cnt;
+ int assoc_freed;
};
struct nvmet_fc_port_entry {
@@ -1271,9 +1272,17 @@ nvmet_fc_portentry_bind(struct nvmet_fc_
static void
nvmet_fc_portentry_unbind(struct nvmet_fc_port_entry *pe)
{
+ struct nvmet_fc_port_entry *entry;
unsigned long flags;
spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
+ list_for_each_entry(entry, &nvmet_fc_portentry_list, pe_list) {
+ if (entry == pe)
+ goto out;
+ }
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+ return;
+out:
if (pe->tgtport) {
nvmet_fc_tgtport_put(pe->tgtport);
pe->tgtport->pe = NULL;
@@ -1474,14 +1483,20 @@ static void
__nvmet_fc_free_assocs(struct nvmet_fc_tgtport *tgtport)
{
struct nvmet_fc_tgt_assoc *assoc;
+ unsigned long flags;
+ if (tgtport->assoc_freed)
+ return;
+ tgtport->assoc_freed = 1;
rcu_read_lock();
+ spin_lock_irqsave(&tgtport->lock, flags);
list_for_each_entry_rcu(assoc, &tgtport->assoc_list, a_list) {
if (!nvmet_fc_tgt_a_get(assoc))
continue;
nvmet_fc_schedule_delete_assoc(assoc);
nvmet_fc_tgt_a_put(assoc);
}
+ spin_unlock_irqrestore(&tgtport->lock, flags);
rcu_read_unlock();
}
@@ -1643,8 +1658,10 @@ nvmet_fc_unregister_targetport(struct nv
nvmet_fc_portentry_unbind_tgt(tgtport);
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
flush_workqueue(nvmet_wq);
@@ -2927,8 +2944,10 @@ nvmet_fc_remove_port(struct nvmet_port *
nvmet_fc_portentry_unbind(pe);
if (tgtport) {
+ spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
+ spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
nvmet_fc_tgtport_put(tgtport);
}
--
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [syzbot] [nvme?] BUG: corrupted list in nvmet_fc_remove_port
2026-10-17 9:20 ` Hillf Danton
@ 2026-10-17 10:30 ` syzbot
0 siblings, 0 replies; 20+ messages in thread
From: syzbot @ 2026-10-17 10:30 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: trying to register non-static key in __nvmet_fc_free_assocs
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 UID: 0 PID: 6854 Comm: syz.0.124 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:1028
register_lock_class+0xcc/0x2e0 kernel/locking/lockdep.c:1343
__lock_acquire+0x10c/0x2de0 kernel/locking/lockdep.c:5162
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
spin_lock include/linux/spinlock_rt.h:45 [inline]
__nvmet_fc_free_assocs+0x12e/0x430 drivers/nvme/target/fc.c:1492
nvmet_fc_remove_port+0x2b1/0x360 drivers/nvme/target/fc.c:2949
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f94beb6e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f94be1ad028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f94bedf6090 RCX: 00007f94beb6e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f94bec05888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f94bedf6128 R14: 00007f94bedf6090 R15: 00007ffc099f6dd8
</TASK>
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.h:68:9
index 16382 is out of range for type 'unsigned long[8]'
CPU: 0 UID: 0 PID: 6854 Comm: syz.0.124 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
__ubsan_handle_out_of_bounds+0xe8/0xf0 lib/ubsan.c:455
decode_tail kernel/locking/qspinlock.h:68 [inline]
__pv_queued_spin_lock_slowpath+0xaf3/0xbc0 kernel/locking/qspinlock.c:307
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt-spinlock.h:37 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/paravirt-spinlock.h:71 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:115 [inline]
do_raw_spin_lock+0x26c/0x2f0 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:156 [inline]
_raw_spin_lock_irqsave+0x4c/0x60 kernel/locking/spinlock.c:181
rtlock_slowlock kernel/locking/rtmutex.c:1921 [inline]
rtlock_lock kernel/locking/spinlock_rt.c:43 [inline]
__rt_spin_lock kernel/locking/spinlock_rt.c:49 [inline]
rt_spin_lock+0x157/0x400 kernel/locking/spinlock_rt.c:57
spin_lock include/linux/spinlock_rt.h:45 [inline]
__nvmet_fc_free_assocs+0x12e/0x430 drivers/nvme/target/fc.c:1492
nvmet_fc_remove_port+0x2b1/0x360 drivers/nvme/target/fc.c:2949
nvmet_disable_port+0x13e/0x1f0 drivers/nvme/target/core.c:400
nvmet_port_subsys_drop_link+0x1e8/0x210 drivers/nvme/target/configfs.c:1123
configfs_unlink+0x44f/0x6b0 fs/configfs/symlink.c:258
vfs_unlink+0x27b/0x6e0 fs/namei.c:5648
filename_unlinkat+0x3d3/0x610 fs/namei.c:5718
__do_sys_unlinkat fs/namei.c:5747 [inline]
__se_sys_unlinkat+0x83/0x1a0 fs/namei.c:5739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f94beb6e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f94be1ad028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007f94bedf6090 RCX: 00007f94beb6e1d9
RDX: 0000000000000000 RSI: 0000200000000780 RDI: ffffffffffffff9c
RBP: 00007f94bec05888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f94bedf6128 R14: 00007f94bedf6090 R15: 00007ffc099f6dd8
</TASK>
---[ end trace ]---
Tested on:
commit: 58161ead Merge tag 'drm-fixes-2026-10-17' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10d88031580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=16d7f67f980000
^ permalink raw reply [flat|nested] 20+ messages in thread