------------[ cut here ]------------ WARNING: CPU: 1 PID: 6417 at block/genhd.c:589 del_gendisk+0x703/0x780 Modules linked in: CPU: 1 PID: 6417 Comm: syz-executor.2 Not tainted 5.15.127-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 RIP: 0010:del_gendisk+0x703/0x780 block/genhd.c:589 Code: 00 00 4c 89 f6 e8 ed 88 fa ff 4c 89 f7 be 01 00 00 00 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 22 16 fd ff e8 fd 34 90 fd <0f> 0b 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 89 e9 80 e1 07 RSP: 0018:ffffc900056cfdf0 EFLAGS: 00010287 RAX: ffffffff83efdee3 RBX: 0000000000000240 RCX: 0000000000040000 RDX: ffffc90004147000 RSI: 00000000000003bc RDI: 00000000000003bd RBP: 0000000000000000 R08: ffffffff83efd8f8 R09: fffff52000ad9fb9 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100e8fac10 R13: ffff8880747d6000 R14: ffff888147a2c740 R15: ffff8880747d6080 FS: 00007efee747a6c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3db0d65198 CR3: 0000000063389000 CR4: 00000000003506f0 Call Trace: loop_remove drivers/block/loop.c:2452 [inline] loop_control_remove drivers/block/loop.c:2509 [inline] loop_control_ioctl+0x552/0x700 drivers/block/loop.c:2547 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7efee8ef8ae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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:00007efee747a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007efee9017f80 RCX: 00007efee8ef8ae9 RDX: 00000000200022c0 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007efee8f4447a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007efee9017f80 R15: 00007ffc90442378