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: 95d7e6b60c40efd4bb821de7fd9ba47297db7b3f82001f1890b5b0481dd8bc51 run #0: crashed: general protection fault in del_gendisk run #1: crashed: general protection fault in del_gendisk run #2: crashed: general protection fault in del_gendisk run #3: crashed: general protection fault in del_gendisk run #4: crashed: general protection fault in del_gendisk run #5: crashed: general protection fault in del_gendisk run #6: crashed: general protection fault in kernfs_name_hash run #7: crashed: general protection fault in del_gendisk run #8: crashed: general protection fault in del_gendisk run #9: crashed: general protection fault in del_gendisk run #10: crashed: general protection fault in del_gendisk run #11: crashed: general protection fault in del_gendisk run #12: crashed: general protection fault in del_gendisk run #13: crashed: general protection fault in del_gendisk run #14: crashed: general protection fault in del_gendisk run #15: crashed: general protection fault in del_gendisk run #16: crashed: general protection fault in del_gendisk run #17: crashed: general protection fault in del_gendisk run #18: crashed: general protection fault in del_gendisk run #19: crashed: general protection fault in del_gendisk testing current HEAD add227a8d80c6e523ad3b43aac4b586b510bd1eb testing commit add227a8d80c6e523ad3b43aac4b586b510bd1eb compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: bade9286ecd73b18b8bd39ef851684266a3e2ad8e00d5b0656579e471b6b459c all runs: crashed: general protection fault in del_gendisk revisions tested: 2, total time: 19m14.757525821s (build: 12m40.842470075s, test: 5m15.167187196s) the crash still happens on HEAD commit msg: Merge branch 'android12-5.10' into `android12-5.10-lts` crash: general protection fault in del_gendisk RAX: ffffffffffffffda RBX: 00007f4492e61f60 RCX: 00007f4492d5ea39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f4492db8e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff79db89ff R14: 00007f4492cd5300 R15: 0000000000022000 ---[ end trace 7b81c50dde4b30c8 ]--- general protection fault, probably for non-canonical address 0xdffffc000000001a: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000d0-0x00000000000000d7] CPU: 0 PID: 456 Comm: syz-executor.0 Tainted: G W 5.10.101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kill_device drivers/base/core.c:3361 [inline] RIP: 0010:device_del+0xe3/0xd00 drivers/base/core.c:3389 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:ffffc90000a77ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810f4c6068 RCX: ffffffff84213509 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a77d58 R08: 0000000000000001 R09: ffffc90000a77c3f R10: fffff5200014ef87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810f4c6108 R14: fffffbfff0c8b728 R15: 0000000000000008 FS: 00007f4492cd5700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4492e5e0a0 CR3: 000000010f17e000 CR4: 00000000003506b0 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:0x7f4492d5ea39 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:00007f4492cd5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f4492e61f60 RCX: 00007f4492d5ea39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f4492db8e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff79db89ff R14: 00007f4492cd5300 R15: 0000000000022000 Modules linked in: ---[ end trace 7b81c50dde4b30c9 ]--- RIP: 0010:kill_device drivers/base/core.c:3361 [inline] RIP: 0010:device_del+0xe3/0xd00 drivers/base/core.c:3389 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:ffffc90000a77ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810f4c6068 RCX: ffffffff84213509 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a77d58 R08: 0000000000000001 R09: ffffc90000a77c3f R10: fffff5200014ef87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810f4c6108 R14: fffffbfff0c8b728 R15: 0000000000000008 FS: 00007f4492cd5700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4492e5e0a0 CR3: 000000010f17e000 CR4: 00000000003506b0 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