syzbot


BUG: sleeping function called from invalid context in jfs_fsync

Status: upstream: reported C repro on 2025/02/28 03:26
Reported-by: syzbot+219127d0a3bce650e1b6@syzkaller.appspotmail.com
First crash: 12d, last: 12d
Bug presence (1)
Date Name Commit Repro Result
2025/02/28 upstream (ToT) 1e15510b71c9 C Failed due to an error; will retry later
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in jfs_fsync jfs C 3 20d 16d 0/28 upstream: reported C repro on 2025/02/24 05:02

Sample crash report:
BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1572
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 21, name: ksoftirqd/1
preempt_count: 100, expected: 0
RCU nest depth: 0, expected: 0
no locks held by ksoftirqd/1/21.
Preemption disabled at:
[<ffff8000081c3608>] softirq_handle_begin kernel/softirq.c:416 [inline]
[<ffff8000081c3608>] handle_softirqs+0xe0/0xd58 kernel/softirq.c:554
CPU: 1 PID: 21 Comm: ksoftirqd/1 Not tainted 6.1.129-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 __might_resched+0x37c/0x4d8 kernel/sched/core.c:9957
 __might_sleep+0x90/0xe4 kernel/sched/core.c:9886
 down_write+0x28/0x88 kernel/locking/rwsem.c:1572
 inode_lock include/linux/fs.h:758 [inline]
 jfs_fsync+0xa0/0x1c0 fs/jfs/file.c:28
 vfs_fsync_range+0x168/0x188 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2962 [inline]
 dio_complete+0x5c0/0x738 fs/direct-io.c:309
 dio_bio_end_aio+0x488/0x550 fs/direct-io.c:364
 bio_endio+0x7c8/0x80c block/bio.c:1554
 req_bio_endio block/blk-mq.c:780 [inline]
 blk_update_request+0x4ac/0xdf0 block/blk-mq.c:925
 blk_mq_end_request+0x54/0x88 block/blk-mq.c:1050
 lo_complete_rq+0x140/0x258 drivers/block/loop.c:365
 blk_complete_reqs block/blk-mq.c:1130 [inline]
 blk_done_softirq+0x11c/0x168 block/blk-mq.c:1135
 handle_softirqs+0x318/0xd58 kernel/softirq.c:578
 run_ksoftirqd+0x6c/0x29c kernel/softirq.c:945
 smpboot_thread_fn+0x4b0/0x96c kernel/smpboot.c:164
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864

=============================
[ BUG: Invalid wait context ]
6.1.129-syzkaller #0 Tainted: G        W         
-----------------------------
ksoftirqd/1/21 is trying to lock:
ffff0000e1fe58c0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
ffff0000e1fe58c0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: jfs_fsync+0xa0/0x1c0 fs/jfs/file.c:28
other info that might help us debug this:
context-{2:2}
no locks held by ksoftirqd/1/21.
stack backtrace:
CPU: 1 PID: 21 Comm: ksoftirqd/1 Tainted: G        W          6.1.129-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 print_lock_invalid_wait_context kernel/locking/lockdep.c:4701 [inline]
 check_wait_context kernel/locking/lockdep.c:4762 [inline]
 __lock_acquire+0x1b14/0x7680 kernel/locking/lockdep.c:4999
 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
 down_write+0x5c/0x88 kernel/locking/rwsem.c:1573
 inode_lock include/linux/fs.h:758 [inline]
 jfs_fsync+0xa0/0x1c0 fs/jfs/file.c:28
 vfs_fsync_range+0x168/0x188 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2962 [inline]
 dio_complete+0x5c0/0x738 fs/direct-io.c:309
 dio_bio_end_aio+0x488/0x550 fs/direct-io.c:364
 bio_endio+0x7c8/0x80c block/bio.c:1554
 req_bio_endio block/blk-mq.c:780 [inline]
 blk_update_request+0x4ac/0xdf0 block/blk-mq.c:925
 blk_mq_end_request+0x54/0x88 block/blk-mq.c:1050
 lo_complete_rq+0x140/0x258 drivers/block/loop.c:365
 blk_complete_reqs block/blk-mq.c:1130 [inline]
 blk_done_softirq+0x11c/0x168 block/blk-mq.c:1135
 handle_softirqs+0x318/0xd58 kernel/softirq.c:578
 run_ksoftirqd+0x6c/0x29c kernel/softirq.c:945
 smpboot_thread_fn+0x4b0/0x96c kernel/smpboot.c:164
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/28 10:25 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
2025/02/28 08:51 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
2025/02/28 07:19 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
2025/02/28 06:11 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
2025/02/28 04:40 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
2025/02/28 03:26 linux-6.1.y 3a8358583626 6a8fcbc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in jfs_fsync
* Struck through repros no longer work on HEAD.