bisecting fixing commit since 5695e51619745d4fe3ec2506a2f0cd982c5e27a4 building syzkaller on 4c37c133e4bf703d023995535f1e264d8658e08e testing commit 5695e51619745d4fe3ec2506a2f0cd982c5e27a4 with gcc (GCC) 10.2.1 20210217 kernel signature: a3eaf2b85a70a46cd8dbbcff93f0a7861e353eaf119082df5bcb832f3b3207ab all runs: crashed: general protection fault in vmx_vcpu_run testing current HEAD bf05bf16c76bb44ab5156223e1e58e26dfe30a88 testing commit bf05bf16c76bb44ab5156223e1e58e26dfe30a88 with gcc (GCC) 10.2.1 20210217 kernel signature: afb6491bda3e7db69e25000d2a6b5a31db5ca23aad064915684f315d1978e7eb run #0: crashed: BUG: spinlock bad magic in synchronize_srcu run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky Reproducer flagged being flaky revisions tested: 2, total time: 26m32.287454569s (build: 13m24.19731874s, test: 12m39.324147719s) the crash still happens on HEAD commit msg: Linux 5.12-rc8 crash: BUG: spinlock bad magic in synchronize_srcu BUG: spinlock bad magic on CPU#1, syz-executor.4/1850 lock: 0xffff8880ba100040, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 1 PID: 1850 Comm: syz-executor.4 Not tainted 5.12.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x93/0xc2 lib/dump_stack.c:120 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x216/0x2b0 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:159 srcu_might_be_idle kernel/rcu/srcutree.c:772 [inline] synchronize_srcu+0x4f/0x1c0 kernel/rcu/srcutree.c:1010 kvm_mmu_uninit_vm+0x10/0x20 arch/x86/kvm/mmu/mmu.c:5413 kvm_arch_destroy_vm+0x446/0x5f0 arch/x86/kvm/x86.c:10699 kvm_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:841 [inline] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4071 [inline] kvm_dev_ioctl+0xc5f/0x1100 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4123 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+0x11f/0x190 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465ef9 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:00007f44f1cb4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000003 RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffc63f672ef R14: 00007f44f1cb4300 R15: 0000000000022000 general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 1850 Comm: syz-executor.4 Not tainted 5.12.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:rcu_segcblist_enqueue+0xb9/0x130 kernel/rcu/rcu_segcblist.c:349 Code: 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 4e 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 20 48 89 ea 48 c1 ea 03 <80> 3c 02 00 75 21 48 89 75 00 48 89 73 20 48 83 c4 08 5b 5d c3 48 RSP: 0018:ffffc90001dbfc08 EFLAGS: 00010046 RAX: dffffc0000000000 RBX: ffff8880ba100080 RCX: ffffffff8151dd00 RDX: 0000000000000000 RSI: ffffc90001dbfcf0 RDI: ffff8880ba1000a0 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000003 R10: fffff520003b7f73 R11: 6637303030302052 R12: ffffc90001dbfcf0 R13: ffff8880ba100080 R14: 0000000000000000 R15: ffff8880ba100040 FS: 00007f44f1cb4700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000053e038 CR3: 0000000012048000 CR4: 00000000001526e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: srcu_gp_start_if_needed+0x116/0xbc0 kernel/rcu/srcutree.c:828 __call_srcu kernel/rcu/srcutree.c:888 [inline] __synchronize_srcu+0x1d1/0x280 kernel/rcu/srcutree.c:934 kvm_mmu_uninit_vm+0x10/0x20 arch/x86/kvm/mmu/mmu.c:5413 kvm_arch_destroy_vm+0x446/0x5f0 arch/x86/kvm/x86.c:10699 kvm_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:841 [inline] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4071 [inline] kvm_dev_ioctl+0xc5f/0x1100 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4123 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+0x11f/0x190 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465ef9 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:00007f44f1cb4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000003 RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffc63f672ef R14: 00007f44f1cb4300 R15: 0000000000022000 Modules linked in: ---[ end trace c188e69295719abf ]--- RIP: 0010:rcu_segcblist_enqueue+0xb9/0x130 kernel/rcu/rcu_segcblist.c:349 Code: 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 4e 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 20 48 89 ea 48 c1 ea 03 <80> 3c 02 00 75 21 48 89 75 00 48 89 73 20 48 83 c4 08 5b 5d c3 48 RSP: 0018:ffffc90001dbfc08 EFLAGS: 00010046 RAX: dffffc0000000000 RBX: ffff8880ba100080 RCX: ffffffff8151dd00 RDX: 0000000000000000 RSI: ffffc90001dbfcf0 RDI: ffff8880ba1000a0 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000003 R10: fffff520003b7f73 R11: 6637303030302052 R12: ffffc90001dbfcf0 R13: ffff8880ba100080 R14: 0000000000000000 R15: ffff8880ba100040 FS: 00007f44f1cb4700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000053e038 CR3: 0000000012048000 CR4: 00000000001526e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400