bisecting fixing commit since caffb99b6929f41a69edbb5aef3a359bf45f3315 building syzkaller on bd28eb9d7873a6a3232f8c5011e3175e2c9e8319 testing commit caffb99b6929f41a69edbb5aef3a359bf45f3315 with gcc (GCC) 8.1.0 kernel signature: 42db7d3d3da7b2b4d134469800123cfd4c858dea3a2142855ede11e99257ab71 all runs: crashed: WARNING: locking bug in finish_task_switch testing current HEAD eccc876724927ff3b9ff91f36f7b6b159e948f0c testing commit eccc876724927ff3b9ff91f36f7b6b159e948f0c with gcc (GCC) 8.1.0 kernel signature: 0cc0b3962e934a438eca93843defcb8cfe9836f3cefda65ed659eb6e92f37d59 all runs: crashed: WARNING: locking bug in finish_task_switch revisions tested: 2, total time: 18m10.185331091s (build: 10m31.635019599s, test: 7m0.916469146s) the crash still happens on HEAD commit msg: Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs crash: WARNING: locking bug in finish_task_switch ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 0 PID: 10823 at kernel/locking/lockdep.c:200 hlock_class kernel/locking/lockdep.c:200 [inline] WARNING: CPU: 0 PID: 10823 at kernel/locking/lockdep.c:200 check_wait_context kernel/locking/lockdep.c:4530 [inline] WARNING: CPU: 0 PID: 10823 at kernel/locking/lockdep.c:200 __lock_acquire+0x764/0x1770 kernel/locking/lockdep.c:4781 Modules linked in: CPU: 0 PID: 10823 Comm: syz-executor.5 Not tainted 5.10.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:hlock_class kernel/locking/lockdep.c:200 [inline] RIP: 0010:check_wait_context kernel/locking/lockdep.c:4530 [inline] RIP: 0010:__lock_acquire+0x764/0x1770 kernel/locking/lockdep.c:4781 Code: 28 85 c0 0f 84 c9 fb ff ff 8b 05 2f 81 51 03 85 c0 0f 85 bb fb ff ff 48 c7 c6 7d 40 ee 83 48 c7 c7 ef 2a e9 83 e8 a3 4d d9 01 <0f> 0b 31 c0 44 8b 4c 24 28 e9 51 fb ff ff 8b 83 f4 08 00 00 85 c0 RSP: 0018:ffffc9000a8fba40 EFLAGS: 00010086 RAX: 0000000000000000 RBX: ffff8881208ba6c0 RCX: 0000000000000003 RDX: 0000000080000003 RSI: ffffffff84077ce9 RDI: 00000000ffffffff RBP: ffff8881208bafd0 R08: 0000000000000000 R09: c0000000ffffdfff R10: ffffc9000a8fb870 R11: ffffc9000a8fb868 R12: ffffffff85b6a760 R13: 0000000000000001 R14: 0000000000000004 R15: 0000000000000001 FS: 00007f73187f8700(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000050d610 CR3: 00000001203b5000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0xf9/0x420 kernel/locking/lockdep.c:5436 finish_lock_switch kernel/sched/core.c:3512 [inline] finish_task_switch+0x91/0x290 kernel/sched/core.c:3613 context_switch kernel/sched/core.c:3777 [inline] __schedule+0x40c/0x890 kernel/sched/core.c:4523 preempt_schedule_irq+0x42/0x90 kernel/sched/core.c:4784 irqentry_exit_cond_resched kernel/entry/common.c:367 [inline] irqentry_exit+0x65/0x90 kernel/entry/common.c:387 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:653 [inline] RIP: 0010:lock_acquire+0x133/0x420 kernel/locking/lockdep.c:5439 Code: b8 ff ff ff ff 65 0f c1 05 1a 41 de 7e 83 f8 01 0f 85 e0 01 00 00 48 83 3d d1 74 09 03 00 0f 84 f0 01 00 00 48 8b 3c 24 57 9d <0f> 1f 44 00 00 48 8b 44 24 30 65 48 33 04 25 28 00 00 00 0f 85 ca RSP: 0018:ffffc9000a8fbcd8 EFLAGS: 00000286 RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff83e8c137 RDI: 0000000000000286 RBP: 0000000000000000 R08: ffffffff85dd47d8 R09: ffffffff85bd4250 R10: ffffffff84bcdda0 R11: 0000000000000003 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8881203c0138 R15: 0000000000000000 flush_workqueue+0xa6/0x590 kernel/workqueue.c:2783 hci_dev_open+0x3a/0xa0 net/bluetooth/hci_core.c:1667 hci_sock_bind+0x38c/0x6b0 net/bluetooth/hci_sock.c:1199 __sys_bind+0xc7/0xe0 net/socket.c:1656 __do_sys_bind net/socket.c:1667 [inline] __se_sys_bind net/socket.c:1665 [inline] __x64_sys_bind+0x11/0x20 net/socket.c:1665 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45caa9 Code: 8d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 5b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f73187f7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00000000004d99c0 RCX: 000000000045caa9 RDX: 0000000000000006 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000002c R14: 00000000004c2f59 R15: 00007f73187f86d4