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: 78040e6c1cd8faf2ed40bf5d8f25da052bc0de143b6389ff2a484175fc5302df run #0: crashed: general protection fault in del_gendisk run #1: crashed: general protection fault in kernfs_name_hash 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 del_gendisk 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 4b644356291a7e075c1b2a276b67d25042d20694 testing commit 4b644356291a7e075c1b2a276b67d25042d20694 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 00521e0740ec59d4948927b8d696d2cf1cdcd426093c34c83e5757e982af3d0e all runs: crashed: general protection fault in del_gendisk revisions tested: 2, total time: 22m57.844771684s (build: 12m44.431493114s, test: 5m43.125496945s) the crash still happens on HEAD commit msg: ANDROID: GKI: disable CONFIG_FORTIFY_SOURCE crash: general protection fault in del_gendisk RAX: ffffffffffffffda RBX: 00007f46cb21ff60 RCX: 00007f46cb11ca39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f46cb176e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe5d483e0f R14: 00007f46cb093300 R15: 0000000000022000 ---[ end trace 1f6dbaf91cab261a ]--- 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: 465 Comm: syz-executor.4 Tainted: G W 5.10.81-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:ffffc90000a87ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88811007c068 RCX: ffffffff84200eb9 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a87d58 R08: 0000000000000001 R09: ffffc90000a87c3f R10: fffff52000150f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88811007c108 R14: fffffbfff0c8b390 R15: 0000000000000008 FS: 00007f46cb093700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f46a179af78 CR3: 0000000121e65000 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:0x7f46cb11ca39 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:00007f46cb093188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46cb21ff60 RCX: 00007f46cb11ca39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f46cb176e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe5d483e0f R14: 00007f46cb093300 R15: 0000000000022000 Modules linked in: ---[ end trace 1f6dbaf91cab261b ]--- 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:ffffc90000a87ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88811007c068 RCX: ffffffff84200eb9 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a87d58 R08: 0000000000000001 R09: ffffc90000a87c3f R10: fffff52000150f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88811007c108 R14: fffffbfff0c8b390 R15: 0000000000000008 FS: 00007f46cb093700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f46a179af78 CR3: 0000000121e65000 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