BUG: sleeping function called from invalid context at mm/util.c:743 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5322, name: syz.0.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by syz.0.0/5322: #0: ffff888031cf20c8 (&mapping->i_private_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #0: ffff888031cf20c8 (&mapping->i_private_lock){+.+.}-{3:3}, at: __buffer_migrate_folio+0x240/0x620 mm/migrate.c:853 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted 6.15.0-rc3-syzkaller-00244-gc3137514f1f1 #0 PREEMPT(full) 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_lvl+0x189/0x250 lib/dump_stack.c:120 __might_resched+0x495/0x610 kernel/sched/core.c:8818 folio_mc_copy+0x141/0x1d0 mm/util.c:743 __migrate_folio mm/migrate.c:758 [inline] filemap_migrate_folio+0xba/0x4c0 mm/migrate.c:943 __buffer_migrate_folio+0x430/0x620 mm/migrate.c:874 move_to_new_folio+0x2df/0xb10 mm/migrate.c:1050 migrate_folio_move mm/migrate.c:1358 [inline] migrate_folios_move mm/migrate.c:1710 [inline] migrate_pages_batch+0x1c34/0x2830 mm/migrate.c:1957 migrate_pages_sync mm/migrate.c:2014 [inline] migrate_pages+0x1f8a/0x2850 mm/migrate.c:2096 do_mbind mm/mempolicy.c:1425 [inline] kernel_mbind mm/mempolicy.c:1568 [inline] __do_sys_mbind mm/mempolicy.c:1642 [inline] __se_sys_mbind+0xa3e/0xc30 mm/mempolicy.c:1638 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f397698e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3977798038 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed RAX: ffffffffffffffda RBX: 00007f3976bb6160 RCX: 00007f397698e969 RDX: 0000000000000000 RSI: 0000000000c00000 RDI: 0000200000000000 RBP: 00007f3976a10ab1 R08: 0000000000000000 R09: 0000000000000002 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3976bb6160 R15: 00007ffca76b0c18