BUG: sleeping function called from invalid context at mm/migrate.c:1741 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5809, name: syz.0.17 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by syz.0.17/5809: #0: ffff88817766d6d8 (ptlock_ptr(ptdesc)){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #0: ffff88817766d6d8 (ptlock_ptr(ptdesc)){+.+.}-{3:3}, at: huge_pte_lock+0x17b/0x1e0 include/linux/hugetlb.h:1318 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 UID: 0 PID: 5809 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 __might_resched+0x378/0x4d0 kernel/sched/core.c:9197 migrate_hugetlbs mm/migrate.c:1741 [inline] migrate_pages+0x49b/0x27e0 mm/migrate.c:2196 do_mbind mm/mempolicy.c:1617 [inline] kernel_mbind mm/mempolicy.c:1760 [inline] __do_sys_mbind mm/mempolicy.c:1834 [inline] __se_sys_mbind+0xe82/0x10e0 mm/mempolicy.c:1830 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc92ad9ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc92bc65028 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed RAX: ffffffffffffffda RBX: 00007fc92b015fa0 RCX: 00007fc92ad9ce59 RDX: 0000000000000001 RSI: 0000000000600000 RDI: 0000200000000000 RBP: 00007fc92ae32e6f R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc92b016038 R14: 00007fc92b015fa0 R15: 00007ffed35b2a68 ======================================================