[moderation] [fs?] BUG: sleeping function called from invalid context in null_process_zoned_cmd

0 views
Skip to first unread message

syzbot

unread,
Aug 10, 2026, 8:12:29 PM (7 hours ago) Aug 10
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b643e495ae92 Merge tag 's390-7.2-7' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15dfffb9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=aaf0da806f995318
dashboard link: https://syzkaller.appspot.com/bug?extid=6bbaf1e18b42b3fe6248
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
CC: [a.hin...@kernel.org lei...@debian.org linux-...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1d3997d6fc9c/disk-b643e495.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a06bbfbf8b50/vmlinux-b643e495.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0126db62cea6/bzImage-b643e495.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6bbaf1...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:623
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 19399, name: syz.6.4428
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
7 locks held by syz.6.4428/19399:
#0: ffff888030e500f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1259
#1: ffff88801d756450 (sb_writers#12){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2733 [inline]
#1: ffff88801d756450 (sb_writers#12){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 fs/read_write.c:683
#2: ffff888029822280 (&buffer->mutex){+.+.}-{4:4}, at: configfs_write_iter+0x7e/0x430 fs/configfs/file.c:226
#3: ffff888057f6c870 (&p->frag_sem){.+.+}-{4:4}, at: flush_write_buffer fs/configfs/file.c:205 [inline]
#3: ffff888057f6c870 (&p->frag_sem){.+.+}-{4:4}, at: configfs_write_iter+0x238/0x430 fs/configfs/file.c:229
#4: ffffffff9aaec560 (&lock){+.+.}-{4:4}, at: nullb_device_power_store+0xdb/0x380 drivers/block/null_blk/main.c:496
#5: ffff888051072350 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xde/0xd70 block/bdev.c:948
#6: ffffffff8eb59c60 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#6: ffffffff8eb59c60 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#6: ffffffff8eb59c60 (rcu_read_lock){....}-{1:3}, at: blk_mq_submit_bio+0x1c8a/0x2a40 block/blk-mq.c:3208
CPU: 0 UID: 0 PID: 19399 Comm: syz.6.4428 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
__might_resched+0x378/0x4d0 kernel/sched/core.c:9197
__mutex_lock_common kernel/locking/mutex.c:623 [inline]
__mutex_lock+0x118/0x1550 kernel/locking/mutex.c:821
null_lock_zone drivers/block/null_blk/zoned.c:39 [inline]
null_process_zoned_cmd+0x6f6/0xf80 drivers/block/null_blk/zoned.c:732
null_handle_cmd drivers/block/null_blk/main.c:1455 [inline]
null_queue_rq+0x8bc/0xe70 drivers/block/null_blk/main.c:1703
__blk_mq_issue_directly block/blk-mq.c:2694 [inline]
blk_mq_try_issue_directly+0x3f4/0x880 block/blk-mq.c:2754
blk_mq_submit_bio+0x20c0/0x2a40 block/blk-mq.c:3208
__submit_bio_noacct_mq block/blk-core.c:756 [inline]
submit_bio_noacct_nocheck+0x2f4/0xa40 block/blk-core.c:790
bh_submit fs/buffer.c:1239 [inline]
block_read_full_folio+0x7a6/0x810 fs/buffer.c:2463
filemap_read_folio+0x12c/0x3a0 mm/filemap.c:2516
do_read_cache_folio+0x354/0x590 mm/filemap.c:4146
read_mapping_folio include/linux/pagemap.h:1015 [inline]
read_part_sector+0xb6/0x2b0 block/partitions/core.c:724
adfspart_check_ICS+0xb1/0x960 block/partitions/acorn.c:357
check_partition block/partitions/core.c:143 [inline]
blk_add_partitions block/partitions/core.c:591 [inline]
bdev_disk_changed+0x851/0x17a0 block/partitions/core.c:695
blkdev_get_whole+0x372/0x510 block/bdev.c:751
bdev_open+0x324/0xd70 block/bdev.c:960
bdev_file_open_by_dev+0x1be/0x240 block/bdev.c:1062
disk_scan_partitions+0x1bb/0x2c0 block/genhd.c:387
add_disk_final block/genhd.c:412 [inline]
add_disk_fwnode+0x24b/0x3a0 block/genhd.c:606
add_disk include/linux/blkdev.h:800 [inline]
null_add_dev+0x130b/0x1d70 drivers/block/null_blk/main.c:2052
nullb_device_power_store+0x240/0x380 drivers/block/null_blk/main.c:501
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x337/0x430 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f95ef39e0d9
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:00007f95f019b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f95ef625fa0 RCX: 00007f95ef39e0d9
RDX: 0000000000000002 RSI: 0000200000000700 RDI: 0000000000000005
RBP: 00007f95ef435024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f95ef626038 R14: 00007f95ef625fa0 R15: 00007ffe19f02fb8
</TASK>
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: kernel/locking/mutex.c:625 at __mutex_lock_common kernel/locking/mutex.c:625 [inline], CPU#0: syz.6.4428/19399
WARNING: kernel/locking/mutex.c:625 at __mutex_lock+0x12d8/0x1550 kernel/locking/mutex.c:821, CPU#0: syz.6.4428/19399
Modules linked in:

CPU: 0 UID: 0 PID: 19399 Comm: syz.6.4428 Tainted: G W L syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN, [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:625 [inline]
RIP: 0010:__mutex_lock+0x12df/0x1550 kernel/locking/mutex.c:821
Code: 7a 57 90 48 c1 e8 03 0f b6 04 18 84 c0 0f 85 47 02 00 00 83 3d 45 38 85 04 00 75 13 48 8d 3d c8 87 88 04 48 c7 c6 40 f7 ec 8b <67> 48 0f b9 3a 90 e9 75 ee ff ff 90 0f 0b 90 e9 48 f2 ff ff 90 0f
RSP: 0018:ffffc9001182ed40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000080000
RDX: ffffc90012289000 RSI: ffffffff8becf740 RDI: ffffffff905ac9d0
RBP: ffffc9001182eed0 R08: ffffffff90577a43 R09: 1ffffffff20aef48
R10: dffffc0000000000 R11: fffffbfff20aef49 R12: ffff88804b9c0000
R13: 0000000000000000 R14: 1ffff92002305dbc R15: 0000000000000000
FS: 00007f95f019b6c0(0000) GS:ffff888124f55000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f81bff8 CR3: 000000007cb27000 CR4: 0000000000350ef0
Call Trace:
<TASK>
null_lock_zone drivers/block/null_blk/zoned.c:39 [inline]
null_process_zoned_cmd+0x6f6/0xf80 drivers/block/null_blk/zoned.c:732
null_handle_cmd drivers/block/null_blk/main.c:1455 [inline]
null_queue_rq+0x8bc/0xe70 drivers/block/null_blk/main.c:1703
__blk_mq_issue_directly block/blk-mq.c:2694 [inline]
blk_mq_try_issue_directly+0x3f4/0x880 block/blk-mq.c:2754
blk_mq_submit_bio+0x20c0/0x2a40 block/blk-mq.c:3208
__submit_bio_noacct_mq block/blk-core.c:756 [inline]
submit_bio_noacct_nocheck+0x2f4/0xa40 block/blk-core.c:790
bh_submit fs/buffer.c:1239 [inline]
block_read_full_folio+0x7a6/0x810 fs/buffer.c:2463
filemap_read_folio+0x12c/0x3a0 mm/filemap.c:2516
do_read_cache_folio+0x354/0x590 mm/filemap.c:4146
read_mapping_folio include/linux/pagemap.h:1015 [inline]
read_part_sector+0xb6/0x2b0 block/partitions/core.c:724
adfspart_check_ICS+0xb1/0x960 block/partitions/acorn.c:357
check_partition block/partitions/core.c:143 [inline]
blk_add_partitions block/partitions/core.c:591 [inline]
bdev_disk_changed+0x851/0x17a0 block/partitions/core.c:695
blkdev_get_whole+0x372/0x510 block/bdev.c:751
bdev_open+0x324/0xd70 block/bdev.c:960
bdev_file_open_by_dev+0x1be/0x240 block/bdev.c:1062
disk_scan_partitions+0x1bb/0x2c0 block/genhd.c:387
add_disk_final block/genhd.c:412 [inline]
add_disk_fwnode+0x24b/0x3a0 block/genhd.c:606
add_disk include/linux/blkdev.h:800 [inline]
null_add_dev+0x130b/0x1d70 drivers/block/null_blk/main.c:2052
nullb_device_power_store+0x240/0x380 drivers/block/null_blk/main.c:501
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x337/0x430 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f95ef39e0d9
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:00007f95f019b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f95ef625fa0 RCX: 00007f95ef39e0d9
RDX: 0000000000000002 RSI: 0000200000000700 RDI: 0000000000000005
RBP: 00007f95ef435024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f95ef626038 R14: 00007f95ef625fa0 R15: 00007ffe19f02fb8
</TASK>
----------------
Code disassembly (best guess):
0: 7a 57 jp 0x59
2: 90 nop
3: 48 c1 e8 03 shr $0x3,%rax
7: 0f b6 04 18 movzbl (%rax,%rbx,1),%eax
b: 84 c0 test %al,%al
d: 0f 85 47 02 00 00 jne 0x25a
13: 83 3d 45 38 85 04 00 cmpl $0x0,0x4853845(%rip) # 0x485385f
1a: 75 13 jne 0x2f
1c: 48 8d 3d c8 87 88 04 lea 0x48887c8(%rip),%rdi # 0x48887eb
23: 48 c7 c6 40 f7 ec 8b mov $0xffffffff8becf740,%rsi
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: 90 nop
30: e9 75 ee ff ff jmp 0xffffeeaa
35: 90 nop
36: 0f 0b ud2
38: 90 nop
39: e9 48 f2 ff ff jmp 0xfffff286
3e: 90 nop
3f: 0f .byte 0xf


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages