bisecting fixing commit since 234d53d2bb60a9436a6d4d55bef1712613b79014 building syzkaller on c1132b49314d96788d6467f64e567faa31e8e063 testing commit 234d53d2bb60a9436a6d4d55bef1712613b79014 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: cef166dbefdfd4f1d4d923322eab7e9391e2d3412ca9818598d80c6d4918c588 all runs: crashed: general protection fault in del_gendisk testing current HEAD c4d08791d941565c837183ee309f7606782f557f testing commit c4d08791d941565c837183ee309f7606782f557f compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6d729d78ceafd36759db8a3d37ec0bcf844ea14487f3c219e9f050163dc735f7 all runs: crashed: general protection fault in del_gendisk revisions tested: 2, total time: 20m1.920829099s (build: 13m20.014799173s, test: 5m47.207129678s) the crash still happens on HEAD commit msg: Merge 5.10.87 into android12-5.10-lts crash: general protection fault in del_gendisk RAX: ffffffffffffffda RBX: 00007f2b20835f60 RCX: 00007f2b20732a39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f2b2078ce8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc7175ebef R14: 00007f2b206a9300 R15: 0000000000022000 ---[ end trace 606ffe9320197c28 ]--- general protection fault, probably for non-canonical address 0xdffffc000000001a: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000d0-0x00000000000000d7] CPU: 1 PID: 457 Comm: syz-executor.1 Tainted: G W 5.10.87-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kill_device drivers/base/core.c:3355 [inline] RIP: 0010:device_del+0xe3/0xd00 drivers/base/core.c:3383 Code: c1 ea 03 80 3c 02 00 0f 85 c6 0a 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 68 49 8d bc 24 d0 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e a7 09 00 00 41 0f b6 84 24 d0 00 00 RSP: 0018:ffffc90000ab7ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810f69c068 RCX: ffffffff84206909 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000ab7d58 R08: 0000000000000001 R09: ffffc90000ab7c3f R10: fffff52000156f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810f69c108 R14: fffffbfff0c8b538 R15: 0000000000000008 FS: 00007f2b206a9700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2b20687f78 CR3: 000000010efe9000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: del_gendisk+0x5ef/0xa10 block/genhd.c:953 loop_remove drivers/block/loop.c:2185 [inline] loop_control_ioctl drivers/block/loop.c:2284 [inline] loop_control_ioctl+0x30d/0x3d0 drivers/block/loop.c:2250 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x129/0x1a0 fs/ioctl.c:739 do_syscall_64+0x32/0x80 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f2b20732a39 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2b206a9188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2b20835f60 RCX: 00007f2b20732a39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f2b2078ce8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc7175ebef R14: 00007f2b206a9300 R15: 0000000000022000 Modules linked in: ---[ end trace 606ffe9320197c29 ]--- RIP: 0010:kill_device drivers/base/core.c:3355 [inline] RIP: 0010:device_del+0xe3/0xd00 drivers/base/core.c:3383 Code: c1 ea 03 80 3c 02 00 0f 85 c6 0a 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 68 49 8d bc 24 d0 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e a7 09 00 00 41 0f b6 84 24 d0 00 00 RSP: 0018:ffffc90000ab7ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810f69c068 RCX: ffffffff84206909 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000ab7d58 R08: 0000000000000001 R09: ffffc90000ab7c3f R10: fffff52000156f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810f69c108 R14: fffffbfff0c8b538 R15: 0000000000000008 FS: 00007f2b206a9700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2b20687f78 CR3: 000000010efe9000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: c1 ea 03 shr $0x3,%edx 3: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 7: 0f 85 c6 0a 00 00 jne 0xad3 d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 14: fc ff df 17: 4c 8b 63 68 mov 0x68(%rbx),%r12 1b: 49 8d bc 24 d0 00 00 lea 0xd0(%r12),%rdi 22: 00 23: 48 89 fa mov %rdi,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 74 06 je 0x38 32: 0f 8e a7 09 00 00 jle 0x9df 38: 41 rex.B 39: 0f .byte 0xf 3a: b6 84 mov $0x84,%dh 3c: 24 d0 and $0xd0,%al