BUG: scheduling while atomic: syz-executor.4/16967/0x00000002 Modules linked in: Preemption disabled at: [] __up_read kernel/locking/rwsem.c:1374 [inline] [] up_read+0x16/0x170 kernel/locking/rwsem.c:1645 CPU: 0 PID: 16967 Comm: syz-executor.4 Tainted: G W 5.15.148-syzkaller-00013-gad06eaf051cd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 dump_stack+0x15/0x17 lib/dump_stack.c:113 __schedule_bug+0x195/0x260 kernel/sched/core.c:5707 schedule_debug kernel/sched/core.c:5734 [inline] __schedule+0xd19/0x1590 kernel/sched/core.c:6402 schedule+0x11f/0x1e0 kernel/sched/core.c:6595 io_schedule+0x8f/0x120 kernel/sched/core.c:8641 wait_on_page_bit_common+0x89f/0xcc0 mm/filemap.c:1360 __lock_page+0x84/0xa0 mm/filemap.c:1652 lock_page include/linux/pagemap.h:623 [inline] __get_meta_page+0x39d/0x680 fs/f2fs/checkpoint.c:98 f2fs_get_meta_page_retry+0x2e/0x210 fs/f2fs/checkpoint.c:124 f2fs_get_sum_page fs/f2fs/segment.c:2380 [inline] change_curseg+0x9e7/0xc40 fs/f2fs/segment.c:2689 allocate_segment_by_default+0x2fb/0x500 fs/f2fs/segment.c:2879 f2fs_allocate_data_block+0x176f/0x3490 fs/f2fs/segment.c:3389 __allocate_data_block+0x5aa/0xb60 fs/f2fs/data.c:1396 f2fs_map_blocks+0x17cf/0x3ac0 fs/f2fs/data.c:1564 f2fs_iomap_begin+0x29d/0xc10 fs/f2fs/data.c:4161 iomap_iter+0x5b5/0xbe0 fs/iomap/iter.c:74 __iomap_dio_rw+0xb3a/0x1ed0 fs/iomap/direct-io.c:593 f2fs_dio_write_iter fs/f2fs/file.c:4542 [inline] f2fs_file_write_iter+0x1012/0x2920 fs/f2fs/file.c:4674 call_write_iter include/linux/fs.h:2202 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xd5d/0x1110 fs/read_write.c:594 ksys_write+0x199/0x2c0 fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:656 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f3f44a00ea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3f437740c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3f44b2ef80 RCX: 00007f3f44a00ea9 RDX: 00007ffffffff000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f3f44a4d4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f3f44b2ef80 R15: 00007fff094d6958