BUG: sleeping function called from invalid context at mm/util.c:742 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 7101, name: syz-executor140 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 2 locks held by syz-executor140/7101: #0: ffff888032c2e420 (sb_writers#3){.+.+}-{0:0}, at: direct_splice_actor+0x49/0x220 fs/splice.c:1157 #1: ffff888148ca65c8 (&mapping->i_private_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff888148ca65c8 (&mapping->i_private_lock){+.+.}-{3:3}, at: __buffer_migrate_folio+0x241/0x5d0 mm/migrate.c:853 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 UID: 0 PID: 7101 Comm: syz-executor140 Not tainted 6.14.0-syzkaller-00685-g3ba7dfb8da62 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 __might_resched+0x5d4/0x780 kernel/sched/core.c:8764 folio_mc_copy+0x13c/0x1d0 mm/util.c:742 __migrate_folio mm/migrate.c:758 [inline] filemap_migrate_folio+0xb4/0x4c0 mm/migrate.c:943 __buffer_migrate_folio+0x3ec/0x5d0 mm/migrate.c:874 move_to_new_folio+0x2ac/0xc20 mm/migrate.c:1050 migrate_folio_move mm/migrate.c:1358 [inline] migrate_folios_move mm/migrate.c:1710 [inline] migrate_pages_batch+0x1e84/0x30b0 mm/migrate.c:1957 migrate_pages_sync mm/migrate.c:1987 [inline] migrate_pages+0x2007/0x3680 mm/migrate.c:2096 compact_zone+0x33d5/0x4ae0 mm/compaction.c:2663 compact_node mm/compaction.c:2932 [inline] compact_nodes mm/compaction.c:2954 [inline] sysctl_compaction_handler+0x496/0x990 mm/compaction.c:3005 proc_sys_call_handler+0x5f3/0x950 fs/proc/proc_sysctl.c:601 iter_file_splice_write+0xbce/0x1510 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x11b/0x220 fs/splice.c:1158 splice_direct_to_actor+0x586/0xc80 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x289/0x3e0 fs/splice.c:1227 do_sendfile+0x564/0x8a0 fs/read_write.c:1368 __do_sys_sendfile64 fs/read_write.c:1423 [inline] __se_sys_sendfile64+0x100/0x1e0 fs/read_write.c:1415 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f615c6e5599 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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:00007f615c67f218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f615c76f358 RCX: 00007f615c6e5599 RDX: 00002000000000c0 RSI: 0000000000000006 RDI: 0000000000000007 RBP: 00007f615c76f350 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000009 R11: 0000000000000246 R12: 00007f615c73c074 R13: 0000200000000080 R14: 0000200000000040 R15: 00002000000000c0