Kernel bug: BUG: corrupted list in __folio_undo_large_rmappable
Subsystem: mm
Status: fixed

Crash report:
list_del corruption, ffffea0001eb8090->next is NULL
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:53!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 5105 Comm: syz-executor331 Not tainted 6.10.0-rc7-next-20240709-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:__list_del_entry_valid_or_report+0xd0/0x140 lib/list_debug.c:52
Code: 06 e2 42 fd 48 8b 13 4c 39 fa 75 6b b0 01 5b 41 5c 41 5e 41 5f c3 cc cc cc cc 48 c7 c7 a0 9b 20 8c 4c 89 fe e8 71 e0 d7 06 90 <0f> 0b 48 c7 c7 00 9c 20 8c 4c 89 fe e8 5f e0 d7 06 90 0f 0b 48 c7
RSP: 0018:ffffc900034df410 EFLAGS: 00010046
RAX: 0000000000000033 RBX: ffff888140e81000 RCX: f885dda17ff31200
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffea0001eb8090 R08: ffffffff8173a779 R09: 1ffff9200069be1c
R10: dffffc0000000000 R11: fffff5200069be1d R12: dffffc0000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffffea0001eb8090
FS:  00007fe27183f6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200d1a00 CR3: 0000000021fbe000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_init include/linux/list.h:287 [inline]
 __folio_undo_large_rmappable+0x104/0x230 mm/huge_memory.c:3289
 __folio_migrate_mapping+0x6c1/0x3490 mm/migrate.c:418
 __migrate_folio mm/migrate.c:693 [inline]
 migrate_folio+0x111/0x260 mm/migrate.c:720
 move_to_new_folio+0x306/0x12e0
 unmap_and_move_huge_page mm/migrate.c:1444 [inline]
 migrate_hugetlbs mm/migrate.c:1563 [inline]
 migrate_pages+0xb74/0x3460 mm/migrate.c:1960
 do_mbind mm/mempolicy.c:1388 [inline]
 kernel_mbind mm/mempolicy.c:1531 [inline]
 __do_sys_mbind mm/mempolicy.c:1605 [inline]
 __se_sys_mbind+0x1490/0x19f0 mm/mempolicy.c:1601
 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:0x7fe2718a4d39
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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe27183f208 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007fe27192f338 RCX: 00007fe2718a4d39
RDX: 0000000000000000 RSI: 0000000000004000 RDI: 0000000020199000
RBP: 00007fe27192f330 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe2718fc604
R13: 00007fe2718fc008 R14: 7277682f7665642f R15: 00000000ffffff1f
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0xd0/0x140 lib/list_debug.c:52
Code: 06 e2 42 fd 48 8b 13 4c 39 fa 75 6b b0 01 5b 41 5c 41 5e 41 5f c3 cc cc cc cc 48 c7 c7 a0 9b 20 8c 4c 89 fe e8 71 e0 d7 06 90 <0f> 0b 48 c7 c7 00 9c 20 8c 4c 89 fe e8 5f e0 d7 06 90 0f 0b 48 c7
RSP: 0018:ffffc900034df410 EFLAGS: 00010046
RAX: 0000000000000033 RBX: ffff888140e81000 RCX: f885dda17ff31200
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffea0001eb8090 R08: ffffffff8173a779 R09: 1ffff9200069be1c
R10: dffffc0000000000 R11: fffff5200069be1d R12: dffffc0000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffffea0001eb8090
FS:  00007fe27183f6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200d1a00 CR3: 0000000021fbe000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400