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: ee8a379bf5d6b07ca522284f49f8f8069818914a55fd0b74372e3bfc1be01cf7 all runs: crashed: general protection fault in del_gendisk testing current HEAD 0347b16583990db22fff7b3faa6a9aacf4c7cbac testing commit 0347b16583990db22fff7b3faa6a9aacf4c7cbac compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7086ce6671cab9eb8c633da90a43b1d2ca46df035878b9c50deba728869ce55f all runs: crashed: general protection fault in del_gendisk revisions tested: 2, total time: 20m33.906995361s (build: 14m7.007264704s, test: 5m34.860061287s) the crash still happens on HEAD commit msg: Merge 5.10.93 into android12-5.10-lts crash: general protection fault in del_gendisk RBP: 00007f5da2cefe8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc0276374f R14: 00007f5da2c0c300 R15: 0000000000022000 ---[ end trace f307833f6866bf99 ]--- 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: 441 Comm: syz-executor.0 Tainted: G W 5.10.93-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:ffffc90000a97ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810ec70068 RCX: ffffffff8420bec9 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a97d58 R08: 0000000000000001 R09: ffffc90000a97c3f R10: fffff52000152f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810ec70108 R14: fffffbfff0c8b888 R15: 0000000000000008 FS: 00007f5da2c0c700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5da2beb718 CR3: 00000001216fc000 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:0x7f5da2c95a39 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:00007f5da2c0c188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5da2d98f60 RCX: 00007f5da2c95a39 RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 RBP: 00007f5da2cefe8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc0276374f R14: 00007f5da2c0c300 R15: 0000000000022000 Modules linked in: ---[ end trace f307833f6866bf9a ]--- 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:ffffc90000a97ca0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88810ec70068 RCX: ffffffff8420bec9 RDX: 000000000000001a RSI: 0000000000000008 RDI: 00000000000000d0 RBP: ffffc90000a97d58 R08: 0000000000000001 R09: ffffc90000a97c3f R10: fffff52000152f87 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88810ec70108 R14: fffffbfff0c8b888 R15: 0000000000000008 FS: 00007f5da2c0c700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5da2beb718 CR3: 00000001216fc000 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