ci2 starts bisection 2023-07-06 05:10:02.329230119 +0000 UTC m=+50708.369680750 bisecting fixing commit since c957cbb8731536ddc9a01e4c1cd51eab6558aa14 building syzkaller on f325deb023e4e2fb9197004be1b3da738680429c ensuring issue is reproducible on original commit c957cbb8731536ddc9a01e4c1cd51eab6558aa14 testing commit c957cbb8731536ddc9a01e4c1cd51eab6558aa14 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 53b8f33a4419ad8f07481963ab8a83da46c57fc9e4e8091421aef642c7e0bc01 all runs: crashed: BUG: sleeping function called from invalid context in f2fs_register_inmem_page representative crash: BUG: sleeping function called from invalid context in f2fs_register_inmem_page, types: [ATOMIC_SLEEP] check whether we can drop unnecessary instrumentation disabling configs for [HANG LEAK UBSAN BUG KASAN LOCKDEP], they are not needed testing commit c957cbb8731536ddc9a01e4c1cd51eab6558aa14 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: de54e6af1eefa2d0518aec115b5eb6e86b1b8102581e5d2d2b6089b963b1ab6b all runs: crashed: BUG: sleeping function called from invalid context in f2fs_register_inmem_page representative crash: BUG: sleeping function called from invalid context in f2fs_register_inmem_page, types: [ATOMIC_SLEEP] the bug reproduces without the instrumentation disabling configs for [HANG LEAK UBSAN BUG KASAN LOCKDEP], they are not needed testing current HEAD d54cfc420586425d418a53871290cc4a59d33501 testing commit d54cfc420586425d418a53871290cc4a59d33501 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 48ff926382bead9ea9a18a7661c52d48db8a5858ed184158a138f2fbafeab217 all runs: crashed: BUG: sleeping function called from invalid context in f2fs_register_inmem_page representative crash: BUG: sleeping function called from invalid context in f2fs_register_inmem_page, types: [ATOMIC_SLEEP] crash still not fixed/happens on the oldest tested release revisions tested: 3, total time: 5h18m24.144171269s (build: 4h29m59.021903807s, test: 10m27.960403638s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Linux 5.15.120 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: 4259, name: syz-executor.1 1 lock held by syz-executor.1/4259: #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1331 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1494 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1523 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1544 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0x3ce/0xf30 mm/memory.c:1565 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 4259 Comm: syz-executor.1 Not tainted 5.15.120-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 ___might_sleep.cold+0xf4/0x108 kernel/sched/core.c:9625 might_alloc include/linux/sched/mm.h:209 [inline] slab_pre_alloc_hook mm/slab.h:492 [inline] slab_alloc_node mm/slub.c:3134 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x277/0x2b0 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+0x78/0x1e0 fs/f2fs/segment.c:192 f2fs_set_data_page_dirty+0x1fe/0x2a0 fs/f2fs/data.c:3785 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+0xc41/0xf30 mm/memory.c:1565 unmap_vmas+0xbe/0x150 mm/memory.c:1642 exit_mmap+0xa5/0x210 mm/mmap.c:3186 __mmput kernel/fork.c:1118 [inline] mmput+0x6f/0x150 kernel/fork.c:1139 exit_mm kernel/exit.c:548 [inline] do_exit+0x34b/0xbc0 kernel/exit.c:859 do_group_exit+0x34/0xb0 kernel/exit.c:994 get_signal+0xe1/0xcf0 kernel/signal.c:2889 arch_do_signal_or_restart+0xeb/0x790 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x18d/0x220 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f5ed67e10f9 Code: Unable to access opcode bytes at RIP 0x7f5ed67e10cf. RSP: 002b:00007f5ed5b53218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f5ed6900f88 RCX: 00007f5ed67e10f9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f5ed6900f88 RBP: 00007f5ed6900f80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5ed6900f8c R13: 00007fff26eeb43f R14: 00007f5ed5b53300 R15: 0000000000022000 ============================= [ BUG: Invalid wait context ] 5.15.120-syzkaller #0 Tainted: G W ----------------------------- syz-executor.1/4259 is trying to lock: ffff88811918b398 (&fi->inmem_lock){+.+.}-{3:3}, at: f2fs_register_inmem_page+0xca/0x1e0 fs/f2fs/segment.c:201 other info that might help us debug this: context-{4:4} 1 lock held by syz-executor.1/4259: #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1331 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1494 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1523 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1544 [inline] #0: ffff888106c0cc98 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0x3ce/0xf30 mm/memory.c:1565 stack backtrace: CPU: 0 PID: 4259 Comm: syz-executor.1 Tainted: G W 5.15.120-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d 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.cold+0x1e4/0x2c5 kernel/locking/lockdep.c:4961 lock_acquire kernel/locking/lockdep.c:5622 [inline] lock_acquire+0xc9/0x2c0 kernel/locking/lockdep.c:5587 __mutex_lock_common kernel/locking/mutex.c:596 [inline] __mutex_lock+0x82/0x710 kernel/locking/mutex.c:729 f2fs_register_inmem_page+0xca/0x1e0 fs/f2fs/segment.c:201 f2fs_set_data_page_dirty+0x1fe/0x2a0 fs/f2fs/data.c:3785 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+0xc41/0xf30 mm/memory.c:1565 unmap_vmas+0xbe/0x150 mm/memory.c:1642 exit_mmap+0xa5/0x210 mm/mmap.c:3186 __mmput kernel/fork.c:1118 [inline] mmput+0x6f/0x150 kernel/fork.c:1139 exit_mm kernel/exit.c:548 [inline] do_exit+0x34b/0xbc0 kernel/exit.c:859 do_group_exit+0x34/0xb0 kernel/exit.c:994 get_signal+0xe1/0xcf0 kernel/signal.c:2889 arch_do_signal_or_restart+0xeb/0x790 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x18d/0x220 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f5ed67e10f9 Code: Unable to access opcode bytes at RIP 0x7f5ed67e10cf. RSP: 002b:00007f5ed5b53218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f5ed6900f88 RCX: 00007f5ed67e10f9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f5ed6900f88 RBP: 00007f5ed6900f80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5ed6900f8c R13: 00007fff26eeb43f R14: 00007f5ed5b53300 R15: 0000000000022000