syzbot
BUG: sleeping function called from invalid context in nvmet_subsys_nsid_exists
Status:
upstream: reported C repro on 2026/09/18 01:11
Reported-by: syzbot+57d8c168acda50fb1cd8@syzkaller.appspotmail.com
First crash: 11d, last: 10d
▶
▼
Bug presence (1)
| Date |
Name |
Commit |
Repro |
Result |
| 2026/09/21 |
upstream (ToT) |
[unknown] |
C
|
Failed due to an error; will retry later
|
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: 38, name: kworker/u4:2
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
4 locks held by kworker/u4:2/38:
#0: ffff8881423c1d38 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline]
#0: ffff8881423c1d38 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734
#1: ffffc90000aefd00 ((work_completion)(&head->partition_scan_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline]
#1: ffffc90000aefd00 ((work_completion)(&head->partition_scan_work)){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734
#2: ffff88802eee64c8 (&disk->open_mutex){+.+.}-{3:3}, at: nvme_partition_scan_work+0x97/0xf0 drivers/nvme/host/multipath.c:589
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: blk_mq_submit_bio+0x1164/0x2220 block/blk-mq.c:3092
CPU: 0 PID: 38 Comm: kworker/u4:2 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: nvme-wq nvme_partition_scan_work
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
__might_resched+0x48d/0x5f0 kernel/sched/core.c:10212
__mutex_lock_common kernel/locking/mutex.c:580 [inline]
__mutex_lock+0xb6/0xc80 kernel/locking/mutex.c:747
nvmet_subsys_nsid_exists+0xd6/0x150 drivers/nvme/target/configfs.c:633
nvmet_req_find_ns+0x28f/0x320 drivers/nvme/target/core.c:433
nvmet_parse_io_cmd drivers/nvme/target/core.c:904 [inline]
nvmet_req_init+0x373/0xe10 drivers/nvme/target/core.c:977
nvme_loop_queue_rq+0x2be/0x820 drivers/nvme/target/loop.c:151
__blk_mq_issue_directly block/blk-mq.c:2662 [inline]
blk_mq_try_issue_directly+0x445/0x980 block/blk-mq.c:2722
blk_mq_submit_bio+0x137d/0x2220 block/blk-mq.c:3092
__submit_bio+0x12b/0x260 block/blk-core.c:610
__submit_bio_noacct block/blk-core.c:657 [inline]
submit_bio_noacct_nocheck+0x40e/0x9c0 block/blk-core.c:720
submit_bh fs/buffer.c:2835 [inline]
block_read_full_folio+0xab8/0xff0 fs/buffer.c:2460
filemap_read_folio+0x16b/0x790 mm/filemap.c:2420
do_read_cache_folio+0x485/0x7f0 mm/filemap.c:3809
read_mapping_folio include/linux/pagemap.h:898 [inline]
read_part_sector+0xd2/0x350 block/partitions/core.c:718
adfspart_check_ICS+0xa6/0xa30 block/partitions/acorn.c:360
check_partition block/partitions/core.c:138 [inline]
blk_add_partitions block/partitions/core.c:600 [inline]
bdev_disk_changed+0x755/0x1450 block/partitions/core.c:689
nvme_partition_scan_work+0xb0/0xf0 drivers/nvme/host/multipath.c:590
process_one_work kernel/workqueue.c:2657 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
</TASK>
=============================
[ BUG: Invalid wait context ]
syzkaller #0 Tainted: G W
-----------------------------
kworker/u4:2/38 is trying to lock:
ffffffff8daf2a70 (&nvmet_configfs_subsystem.su_mutex){+.+.}-{3:3}, at: nvmet_subsys_nsid_exists+0xd6/0x150 drivers/nvme/target/configfs.c:633
other info that might help us debug this:
context-{4:4}
4 locks held by kworker/u4:2/38:
#0: ffff8881423c1d38 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline]
#0: ffff8881423c1d38 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734
#1: ffffc90000aefd00 ((work_completion)(&head->partition_scan_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline]
#1: ffffc90000aefd00 ((work_completion)(&head->partition_scan_work)){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734
#2: ffff88802eee64c8 (&disk->open_mutex){+.+.}-{3:3}, at: nvme_partition_scan_work+0x97/0xf0 drivers/nvme/host/multipath.c:589
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#3: ffffffff8d1320e0 (rcu_read_lock){....}-{1:2}, at: blk_mq_submit_bio+0x1164/0x2220 block/blk-mq.c:3092
stack backtrace:
CPU: 0 PID: 38 Comm: kworker/u4:2 Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: nvme-wq nvme_partition_scan_work
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_lock_invalid_wait_context kernel/locking/lockdep.c:4751 [inline]
check_wait_context kernel/locking/lockdep.c:4821 [inline]
__lock_acquire+0x17ab/0x7d80 kernel/locking/lockdep.c:5087
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5756
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
nvmet_subsys_nsid_exists+0xd6/0x150 drivers/nvme/target/configfs.c:633
nvmet_req_find_ns+0x28f/0x320 drivers/nvme/target/core.c:433
nvmet_parse_io_cmd drivers/nvme/target/core.c:904 [inline]
nvmet_req_init+0x373/0xe10 drivers/nvme/target/core.c:977
nvme_loop_queue_rq+0x2be/0x820 drivers/nvme/target/loop.c:151
__blk_mq_issue_directly block/blk-mq.c:2662 [inline]
blk_mq_try_issue_directly+0x445/0x980 block/blk-mq.c:2722
blk_mq_submit_bio+0x137d/0x2220 block/blk-mq.c:3092
__submit_bio+0x12b/0x260 block/blk-core.c:610
__submit_bio_noacct block/blk-core.c:657 [inline]
submit_bio_noacct_nocheck+0x40e/0x9c0 block/blk-core.c:720
submit_bh fs/buffer.c:2835 [inline]
block_read_full_folio+0xab8/0xff0 fs/buffer.c:2460
filemap_read_folio+0x16b/0x790 mm/filemap.c:2420
do_read_cache_folio+0x485/0x7f0 mm/filemap.c:3809
read_mapping_folio include/linux/pagemap.h:898 [inline]
read_part_sector+0xd2/0x350 block/partitions/core.c:718
adfspart_check_ICS+0xa6/0xa30 block/partitions/acorn.c:360
check_partition block/partitions/core.c:138 [inline]
blk_add_partitions block/partitions/core.c:600 [inline]
bdev_disk_changed+0x755/0x1450 block/partitions/core.c:689
nvme_partition_scan_work+0xb0/0xf0 drivers/nvme/host/multipath.c:590
process_one_work kernel/workqueue.c:2657 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
</TASK>
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
ldm_validate_partition_table(): Disk read failed.
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 0, async page read
Dev nvme0n1: unable to read RDB block 0
nvme0n1: unable to read partition table
nvme nvme1: rescanning namespaces.
nvme nvme1: rescanning namespaces.
nvme nvme0: rescanning namespaces.
nvme nvme1: rescanning namespaces.
nvme nvme0: rescanning namespaces.
nvme nvme0: rescanning namespaces.
nvme nvme1: rescanning namespaces.
nvme nvme1: rescanning namespaces.
nvme nvme1: rescanning namespaces.
nvme nvme1: rescanning namespaces.
* Struck through repros no longer work on HEAD.