ci2 starts bisection 2023-05-02 08:45:58.609379112 +0000 UTC m=+320612.629750307
bisecting fixing commit since c957cbb8731536ddc9a01e4c1cd51eab6558aa14
building syzkaller on f325deb023e4e2fb9197004be1b3da738680429c
ensuring issue is reproducible on original commit c957cbb8731536ddc9a01e4c1cd51eab6558aa14
testing commit c957cbb8731536ddc9a01e4c1cd51eab6558aa14 gcc
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: d23292c5d7e84fd966c3fc2f9fd9f2efd53616c8aa7311743868781bd0fe9c5e
all runs: crashed: BUG: sleeping function called from invalid context in f2fs_register_inmem_page
testing current HEAD 8a7f2a5c5aa1648edb4f2029c6ec33870afb7a95
testing commit 8a7f2a5c5aa1648edb4f2029c6ec33870afb7a95 gcc
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: dfc5ce5b9f8a9fe92123e014eac29db48633e4677f24603843a33ef7773582fd
all runs: crashed: BUG: sleeping function called from invalid context in f2fs_register_inmem_page
revisions tested: 2, total time: 37m24.047219349s (build: 28m55.123096899s, test: 8m2.70294701s)
the crash still happens on HEAD
commit msg: Linux 5.15.110
crash: BUG: sleeping function called from invalid context in f2fs_register_inmem_page
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:209
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4898, name: syz-executor.3
1 lock held by syz-executor.3/4898:
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1331 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1494 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1523 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1544 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0x7ac/0x1c90 mm/memory.c:1565
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 4898 Comm: syz-executor.3 Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x163/0x213 lib/dump_stack.c:106
___might_sleep+0x547/0x6a0 kernel/sched/core.c:9625
might_alloc include/linux/sched/mm.h:209 [inline]
slab_pre_alloc_hook+0x44/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x3f/0x280 mm/slub.c:3233
f2fs_kmem_cache_alloc_nofail fs/f2fs/f2fs.h:2627 [inline]
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2637 [inline]
f2fs_register_inmem_page+0x161/0x530 fs/f2fs/segment.c:192
f2fs_set_data_page_dirty+0x42f/0x6b0 fs/f2fs/data.c:3781
zap_pte_range mm/memory.c:1366 [inline]
zap_pmd_range mm/memory.c:1494 [inline]
zap_pud_range mm/memory.c:1523 [inline]
zap_p4d_range mm/memory.c:1544 [inline]
unmap_page_range+0xdb6/0x1c90 mm/memory.c:1565
unmap_vmas+0x1f9/0x360 mm/memory.c:1642
exit_mmap+0x34c/0x5b0 mm/mmap.c:3186
__mmput+0xc8/0x2f0 kernel/fork.c:1118
exit_mm+0x5cf/0x710 kernel/exit.c:548
do_exit+0x54a/0x1f70 kernel/exit.c:859
do_group_exit+0x201/0x2d0 kernel/exit.c:994
get_signal+0x4bd/0xf30 kernel/signal.c:2889
arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:865
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fa102d7a0f9
Code: Unable to access opcode bytes at RIP 0x7fa102d7a0cf.
RSP: 002b:00007fa1020ec168 EFLAGS: 00000246
ORIG_RAX: 0000000000000028
RAX: 0000000000122000 RBX: 00007fa102e99f80 RCX: 00007fa102d7a0f9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007fa102dd5b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201005 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe8f46eaff R14: 00007fa1020ec300 R15: 0000000000022000
=============================
[ BUG: Invalid wait context ]
5.15.110-syzkaller #0 Tainted: G W
-----------------------------
syz-executor.3/4898 is trying to lock:
ffff8880698edc18 (&fi->inmem_lock){+.+.}-{3:3}, at: f2fs_register_inmem_page+0x262/0x530 fs/f2fs/segment.c:201
other info that might help us debug this:
context-{4:4}
1 lock held by syz-executor.3/4898:
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1331 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1494 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1523 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1544 [inline]
#0: ffff88801be32d38 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0x7ac/0x1c90 mm/memory.c:1565
stack backtrace:
CPU: 0 PID: 4898 Comm: syz-executor.3 Tainted: G W 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x163/0x213 lib/dump_stack.c:106
print_lock_invalid_wait_context kernel/locking/lockdep.c:4663 [inline]
check_wait_context kernel/locking/lockdep.c:4724 [inline]
__lock_acquire+0x14f5/0x1ff0 kernel/locking/lockdep.c:4961
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
f2fs_register_inmem_page+0x262/0x530 fs/f2fs/segment.c:201
f2fs_set_data_page_dirty+0x42f/0x6b0 fs/f2fs/data.c:3781
zap_pte_range mm/memory.c:1366 [inline]
zap_pmd_range mm/memory.c:1494 [inline]
zap_pud_range mm/memory.c:1523 [inline]
zap_p4d_range mm/memory.c:1544 [inline]
unmap_page_range+0xdb6/0x1c90 mm/memory.c:1565
unmap_vmas+0x1f9/0x360 mm/memory.c:1642
exit_mmap+0x34c/0x5b0 mm/mmap.c:3186
__mmput+0xc8/0x2f0 kernel/fork.c:1118
exit_mm+0x5cf/0x710 kernel/exit.c:548
do_exit+0x54a/0x1f70 kernel/exit.c:859
do_group_exit+0x201/0x2d0 kernel/exit.c:994
get_signal+0x4bd/0xf30 kernel/signal.c:2889
arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:865
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fa102d7a0f9
Code: Unable to access opcode bytes at RIP 0x7fa102d7a0cf.
RSP: 002b:00007fa1020ec168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: 0000000000122000 RBX: 00007fa102e99f80 RCX: 00007fa102d7a0f9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007fa102dd5b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201005 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe8f46eaff R14: 00007fa1020ec300 R15: 0000000000022000