bisecting fixing commit since 7d194c2100ad2a6dded545887d02754948ca5241 building syzkaller on b24d2b8a213c09b511478e7eab5fa343e4a198de testing commit 7d194c2100ad2a6dded545887d02754948ca5241 with gcc (GCC) 8.1.0 kernel signature: fc7af2f6975007b40e62e6833d31a69448fc09402f5a979fcca80801664324f4 all runs: crashed: WARNING: bad unlock balance in rcu_core testing current HEAD 1d2cc5ac6f6668cc15216d51051103c61467d7e8 testing commit 1d2cc5ac6f6668cc15216d51051103c61467d7e8 with gcc (GCC) 8.1.0 kernel signature: 02ce9a085b84a6dc4e491fcde70741f5deaf0450fc48a0cebef3f3002167d376 all runs: OK # git bisect start 1d2cc5ac6f6668cc15216d51051103c61467d7e8 7d194c2100ad2a6dded545887d02754948ca5241 Bisecting: 22172 revisions left to test after this (roughly 15 steps) [ae7bbc091351a4c6ebddfbe36eb5eb7a149cd7a2] Merge branch 'nvme-5.6-rc3' of git://git.infradead.org/nvme into block-5.6 testing commit ae7bbc091351a4c6ebddfbe36eb5eb7a149cd7a2 with gcc (GCC) 8.1.0 kernel signature: 54712843318dc488e91616f23e150371c84d77b256740645a3e28f0115bdc745 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good ae7bbc091351a4c6ebddfbe36eb5eb7a149cd7a2 Bisecting: 11085 revisions left to test after this (roughly 14 steps) [42595ce90b9d4a6b9d8c5a1ea78da4eeaf7e086a] Merge branch 'x86-vmware-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 42595ce90b9d4a6b9d8c5a1ea78da4eeaf7e086a with gcc (GCC) 8.1.0 kernel signature: 6b48915140bb152fbb69e859b61869c8efb2b80e40115b0f410530811263df24 all runs: OK # git bisect bad 42595ce90b9d4a6b9d8c5a1ea78da4eeaf7e086a Bisecting: 5249 revisions left to test after this (roughly 13 steps) [1afa9c3b7c9bdcb562e2afe9f58cc99d0b071cdc] Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc testing commit 1afa9c3b7c9bdcb562e2afe9f58cc99d0b071cdc with gcc (GCC) 8.1.0 kernel signature: cad87c07fa34bcb16175b15866452b89bda133c4d97b659efe4547e85bc29434 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 1afa9c3b7c9bdcb562e2afe9f58cc99d0b071cdc Bisecting: 2624 revisions left to test after this (roughly 11 steps) [69c5eea3128e775fd3c70ecf0098105d96dee330] Merge branch 'parisc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux testing commit 69c5eea3128e775fd3c70ecf0098105d96dee330 with gcc (GCC) 8.1.0 kernel signature: 05b1882e1524abdd2924db9f1bc07a7530bb15cc2e0d5fccdeda2cb9e93e6735 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 69c5eea3128e775fd3c70ecf0098105d96dee330 Bisecting: 1164 revisions left to test after this (roughly 10 steps) [4c6ef3b156c67e8867e04668cb2af902d44e4086] Merge tag 'staging-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging testing commit 4c6ef3b156c67e8867e04668cb2af902d44e4086 with gcc (GCC) 8.1.0 kernel signature: 4f8d5ae2756e5beafcd6ae246594cbe06d22796565bd5b6e41ae1d198bc0a90a all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 4c6ef3b156c67e8867e04668cb2af902d44e4086 Bisecting: 629 revisions left to test after this (roughly 9 steps) [4b9fd8a829a1eec7442e38afff21d610604de56a] Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 4b9fd8a829a1eec7442e38afff21d610604de56a with gcc (GCC) 8.1.0 kernel signature: dd2443bc2a5bbc1bf0ebf9ded9435b8382ef445340e9d635e3ec5b27eac44db6 all runs: OK # git bisect bad 4b9fd8a829a1eec7442e38afff21d610604de56a Bisecting: 275 revisions left to test after this (roughly 8 steps) [2ce94bc4e056d3e48291aac87a95ebd2a86348ba] Merge tag 'pnp-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit 2ce94bc4e056d3e48291aac87a95ebd2a86348ba with gcc (GCC) 8.1.0 kernel signature: 92c0b4ce77b3a3c93e77f764c6413bc015a2124325c40786a592c6d115fc882c all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 2ce94bc4e056d3e48291aac87a95ebd2a86348ba Bisecting: 158 revisions left to test after this (roughly 7 steps) [594e576d4b93b8cda3247542366b47e1b2ddc4dc] efi/libstub/arm: Fix spurious message that an initrd was loaded testing commit 594e576d4b93b8cda3247542366b47e1b2ddc4dc with gcc (GCC) 8.1.0 kernel signature: 78a9d2c33772034ff102b2f5b3137c4c1bf605e98bde64d47271eee0bd5ae9ff all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 594e576d4b93b8cda3247542366b47e1b2ddc4dc Bisecting: 82 revisions left to test after this (roughly 6 steps) [baf5fe761846815164753d1bd0638fd3696db8fd] Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu testing commit baf5fe761846815164753d1bd0638fd3696db8fd with gcc (GCC) 8.1.0 kernel signature: 1f9d1c7d700aabc2172e950a525f1de975cdffcbacd4f2f7dd29920414cfe7ea all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good baf5fe761846815164753d1bd0638fd3696db8fd Bisecting: 41 revisions left to test after this (roughly 5 steps) [49915ac35ca7b07c54295a72d905be5064afb89e] lockdep: Annotate irq_work testing commit 49915ac35ca7b07c54295a72d905be5064afb89e with gcc (GCC) 8.1.0 kernel signature: 0923c7b084fdb90c00b32a47cea13fd87c1839ebad821d96ce2390b697a9adc4 all runs: OK # git bisect bad 49915ac35ca7b07c54295a72d905be5064afb89e Bisecting: 20 revisions left to test after this (roughly 4 steps) [10476e6304222ced7df9b3d5fb0a043b3c2a1ad8] locking/lockdep: Fix bad recursion pattern testing commit 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 with gcc (GCC) 8.1.0 kernel signature: cfb7528c97c1f33068866e2493c0daa74a66b55a94189deee0a717fc05fbf9f4 all runs: OK # git bisect bad 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 Bisecting: 9 revisions left to test after this (roughly 3 steps) [75ff64572e497578e238fefbdff221c96f29067a] locking/percpu-rwsem: Extract __percpu_down_read_trylock() testing commit 75ff64572e497578e238fefbdff221c96f29067a with gcc (GCC) 8.1.0 kernel signature: 0aed8ca77add37cce884c3e228b849709caf2d89fbca33f76dbad4cb94cc1929 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 75ff64572e497578e238fefbdff221c96f29067a Bisecting: 4 revisions left to test after this (roughly 2 steps) [3867913c45b478dec7f9a60b950ad88a14e2a748] Merge branch 'locking/urgent' testing commit 3867913c45b478dec7f9a60b950ad88a14e2a748 with gcc (GCC) 8.1.0 kernel signature: 341c35c611127afa6f62cb0e077512607c7606f8328765f791f0f96a93154214 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 3867913c45b478dec7f9a60b950ad88a14e2a748 Bisecting: 2 revisions left to test after this (roughly 1 step) [4b39f99c222a2aff6a52fddfa6d8d4aef1771737] futex: Remove {get,drop}_futex_key_refs() testing commit 4b39f99c222a2aff6a52fddfa6d8d4aef1771737 with gcc (GCC) 8.1.0 kernel signature: 8ee6b329e84ec46428a96311afb2bd04b3cc9c116467b08edd9333d346428bcb run #0: crashed: WARNING: bad unlock balance in rcu_core run #1: crashed: WARNING: bad unlock balance in rcu_core run #2: crashed: WARNING: bad unlock balance in rcu_core run #3: crashed: WARNING: bad unlock balance in rcu_core run #4: crashed: WARNING: bad unlock balance in rcu_core run #5: crashed: WARNING: bad unlock balance in rcu_core run #6: crashed: WARNING: bad unlock balance in rcu_core run #7: crashed: WARNING: bad unlock balance in rcu_core run #8: crashed: WARNING: bad unlock balance in rcu_core run #9: boot failed: can't ssh into the instance # git bisect good 4b39f99c222a2aff6a52fddfa6d8d4aef1771737 Bisecting: 0 revisions left to test after this (roughly 1 step) [25016bd7f4caf5fc983bbab7403d08e64cba3004] locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps() testing commit 25016bd7f4caf5fc983bbab7403d08e64cba3004 with gcc (GCC) 8.1.0 kernel signature: 6a5b892c59b7dc802443f481182b6df7302ae7e9ad7ae3640f37edce5da5cb7b run #0: boot failed: failed to create instance: googleapi: Error 503: Internal error. Please try again or contact Google Support. (Code: '6026771629584963495'), backendError run #1: crashed: WARNING: bad unlock balance in rcu_core run #2: crashed: WARNING: bad unlock balance in rcu_core run #3: crashed: WARNING: bad unlock balance in rcu_core run #4: crashed: WARNING: bad unlock balance in rcu_core run #5: crashed: WARNING: bad unlock balance in rcu_core run #6: crashed: WARNING: bad unlock balance in rcu_core run #7: crashed: WARNING: bad unlock balance in rcu_core run #8: crashed: WARNING: bad unlock balance in rcu_core run #9: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 25016bd7f4caf5fc983bbab7403d08e64cba3004 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 is the first bad commit commit 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 Author: Peter Zijlstra Date: Fri Mar 13 09:56:38 2020 +0100 locking/lockdep: Fix bad recursion pattern There were two patterns for lockdep_recursion: Pattern-A: if (current->lockdep_recursion) return current->lockdep_recursion = 1; /* do stuff */ current->lockdep_recursion = 0; Pattern-B: current->lockdep_recursion++; /* do stuff */ current->lockdep_recursion--; But a third pattern has emerged: Pattern-C: current->lockdep_recursion = 1; /* do stuff */ current->lockdep_recursion = 0; And while this isn't broken per-se, it is highly dangerous because it doesn't nest properly. Get rid of all Pattern-C instances and shore up Pattern-A with a warning. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200313093325.GW12561@hirez.programming.kicks-ass.net kernel/locking/lockdep.c | 74 ++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 34 deletions(-) culprit signature: cfb7528c97c1f33068866e2493c0daa74a66b55a94189deee0a717fc05fbf9f4 parent signature: 6a5b892c59b7dc802443f481182b6df7302ae7e9ad7ae3640f37edce5da5cb7b revisions tested: 17, total time: 3h30m2.102286315s (build: 1h43m42.205270545s, test: 1h44m50.172727862s) first good commit: 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 locking/lockdep: Fix bad recursion pattern cc: ["linux-kernel@vger.kernel.org" "mingo@redhat.com" "peterz@infradead.org" "will@kernel.org"]