BUG: sleeping function called from invalid context at mm/util.c:742 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5954, name: syz-executor116 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by syz-executor116/5954: #0: ffff88810639ac48 (&mapping->i_private_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #0: ffff88810639ac48 (&mapping->i_private_lock){+.+.}-{3:3}, at: __buffer_migrate_folio+0x25f/0x690 mm/migrate.c:853 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 2 UID: 0 PID: 5954 Comm: syz-executor116 Not tainted 6.14.0-syzkaller-00685-g3ba7dfb8da62 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 __might_resched+0x3c0/0x5e0 kernel/sched/core.c:8764 folio_mc_copy+0xfb/0x190 mm/util.c:742 __migrate_folio.constprop.0+0xa1/0x3d0 mm/migrate.c:758 filemap_migrate_folio mm/migrate.c:943 [inline] __buffer_migrate_folio+0x5d4/0x690 mm/migrate.c:874 move_to_new_folio+0x1d9/0x700 mm/migrate.c:1050 migrate_folio_move mm/migrate.c:1358 [inline] migrate_folios_move mm/migrate.c:1710 [inline] migrate_pages_batch+0x2009/0x3150 mm/migrate.c:1957 migrate_pages_sync+0x131/0x910 mm/migrate.c:1987 migrate_pages+0x1acf/0x2290 mm/migrate.c:2096 do_mbind+0x6c0/0xed0 mm/mempolicy.c:1425 kernel_mbind+0x1e8/0x200 mm/mempolicy.c:1568 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6b1d9baba9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe5e66eaf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f6b1d9baba9 RDX: 0000000000000000 RSI: 0000000000c00000 RDI: 0000200000000000 RBP: 00000000000f4240 R08: 0000000000000000 R09: 0000000000000002 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000a90a R13: 00007ffe5e66eb1c R14: 00007ffe5e66eb30 R15: 00007ffe5e66eb20