BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists

Status: upstream: reported on 2026/09/14 22:11
Reported-by: syzbot+ca8cd3e02081021e08fb@syzkaller.appspotmail.com
First crash: 14d, last: 11d
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists 5 syz, C 3 9d17h 11d 0/2 upstream: reported C repro on 2026/09/18 01:11

Sample crash report:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 4631, name: udevd
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
INFO: lockdep is turned off.
CPU: 0 PID: 4631 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 __might_resched+0x489/0x5f0 kernel/sched/core.c:9970
 __mutex_lock_common kernel/locking/mutex.c:580 [inline]
 __mutex_lock+0xb7/0xae0 kernel/locking/mutex.c:747
 nvmet_subsys_nsid_exists+0xd2/0x150 drivers/nvme/target/configfs.c:632
 nvmet_req_find_ns+0x28b/0x310 drivers/nvme/target/core.c:431
 nvmet_parse_io_cmd drivers/nvme/target/core.c:903 [inline]
 nvmet_req_init+0x36f/0xe90 drivers/nvme/target/core.c:976
 nvme_loop_queue_rq+0x275/0x7c0 drivers/nvme/target/loop.c:151
 __blk_mq_issue_directly block/blk-mq.c:2643 [inline]
 __blk_mq_try_issue_directly+0x4a6/0x7b0 block/blk-mq.c:2696
 blk_mq_request_issue_directly block/blk-mq.c:2730 [inline]
 blk_mq_plug_issue_direct+0x234/0x5a0 block/blk-mq.c:2750
 blk_mq_flush_plug_list+0x6d9/0xc50 block/blk-mq.c:2851
 __blk_flush_plug+0x3e0/0x460 block/blk-core.c:1179
 blk_finish_plug+0x59/0x80 block/blk-core.c:1203
 read_pages+0x677/0x860 mm/readahead.c:184
 page_cache_ra_unbounded+0x667/0x750 mm/readahead.c:270
 do_page_cache_ra mm/readahead.c:300 [inline]
 force_page_cache_ra mm/readahead.c:331 [inline]
 page_cache_sync_ra+0x3d7/0x490 mm/readahead.c:713
 page_cache_sync_readahead include/linux/pagemap.h:1250 [inline]
 filemap_get_pages mm/filemap.c:2665 [inline]
 filemap_read+0x647/0x3150 mm/filemap.c:2759
 blkdev_read_iter+0x42f/0x570 block/fops.c:668
 call_read_iter include/linux/fs.h:2265 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x471/0x960 fs/read_write.c:470
 ksys_read+0x14d/0x260 fs/read_write.c:613
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f11378a7407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007fffba732c00 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f1137fca880 RCX: 00007f11378a7407
RDX: 0000000000001000 RSI: 00007f1137fc9000 RDI: 0000000000000009
RBP: 000056128cbac050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000ff0000 R14: 000056128cbb46f8 R15: 00007f11380f139c
 </TASK>
------------[ cut here ]------------
Voluntary context switch within RCU read-side critical section!
WARNING: CPU: 1 PID: 4631 at kernel/rcu/tree_plugin.h:320 rcu_note_context_switch+0xd79/0x1050 kernel/rcu/tree_plugin.h:320
Modules linked in:
CPU: 1 PID: 4631 Comm: udevd Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:rcu_note_context_switch+0xd79/0x1050 kernel/rcu/tree_plugin.h:320
Code: 02 00 00 4c 89 e7 be 01 00 00 00 ba 02 00 00 00 e8 7c 48 fe ff eb 9c c6 05 b3 5a 9f 0c 01 48 c7 c7 a0 6c 8d 8a e8 17 ca e0 ff <0f> 0b e9 b2 f3 ff ff 0f 0b 45 84 ed 0f 84 79 f3 ff ff e9 a2 f3 ff
RSP: 0018:ffffc900054eed00 EFLAGS: 00010046

RAX: 7e26e9280384e400 RBX: dffffc0000000000 RCX: ffff88802d341e00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffffc900054eee70 R08: ffff8880b8f279db R09: 1ffff110171e4f3b
R10: dffffc0000000000 R11: ffffed10171e4f3c R12: ffff88802d341e00
R13: 0000000000000000 R14: ffff88802d34223c R15: 1ffff92000a9ddbc
FS:  00007f1137fca880(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558582ac9078 CR3: 0000000055858000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __schedule+0x2ca/0x4030 kernel/sched/core.c:6462
 schedule+0xb9/0x180 kernel/sched/core.c:6639
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6698
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x548/0xae0 kernel/locking/mutex.c:747
 nvmet_subsys_nsid_exists+0xd2/0x150 drivers/nvme/target/configfs.c:632
 nvmet_req_find_ns+0x28b/0x310 drivers/nvme/target/core.c:431
 nvmet_parse_io_cmd drivers/nvme/target/core.c:903 [inline]
 nvmet_req_init+0x36f/0xe90 drivers/nvme/target/core.c:976
 nvme_loop_queue_rq+0x275/0x7c0 drivers/nvme/target/loop.c:151
 __blk_mq_issue_directly block/blk-mq.c:2643 [inline]
 __blk_mq_try_issue_directly+0x4a6/0x7b0 block/blk-mq.c:2696
 blk_mq_request_issue_directly block/blk-mq.c:2730 [inline]
 blk_mq_plug_issue_direct+0x234/0x5a0 block/blk-mq.c:2750
 blk_mq_flush_plug_list+0x6d9/0xc50 block/blk-mq.c:2851
 __blk_flush_plug+0x3e0/0x460 block/blk-core.c:1179
 blk_finish_plug+0x59/0x80 block/blk-core.c:1203
 read_pages+0x677/0x860 mm/readahead.c:184
 page_cache_ra_unbounded+0x667/0x750 mm/readahead.c:270
 do_page_cache_ra mm/readahead.c:300 [inline]
 force_page_cache_ra mm/readahead.c:331 [inline]
 page_cache_sync_ra+0x3d7/0x490 mm/readahead.c:713
 page_cache_sync_readahead include/linux/pagemap.h:1250 [inline]
 filemap_get_pages mm/filemap.c:2665 [inline]
 filemap_read+0x647/0x3150 mm/filemap.c:2759
 blkdev_read_iter+0x42f/0x570 block/fops.c:668
 call_read_iter include/linux/fs.h:2265 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x471/0x960 fs/read_write.c:470
 ksys_read+0x14d/0x260 fs/read_write.c:613
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f11378a7407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007fffba732c00 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f1137fca880 RCX: 00007f11378a7407
RDX: 0000000000001000 RSI: 00007f1137fc9000 RDI: 0000000000000009
RBP: 000056128cbac050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000ff0000 R14: 000056128cbb46f8 R15: 00007f11380f139c
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/17 23:31 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/17 23:26 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/17 23:22 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/17 23:44 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/17 23:43 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/14 22:12 linux-6.1.y 1a8763b93150 81a27d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
2026/09/14 22:10 linux-6.1.y 1a8763b93150 81a27d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
* Struck through repros no longer work on HEAD.