bisecting fixing commit since 5a1e843c66fa6438f389045981c37e4073917641 building syzkaller on 25bb509e5964da8203766c4039e4fef25e4689b1 testing commit 5a1e843c66fa6438f389045981c37e4073917641 with gcc (GCC) 8.1.0 kernel signature: 648e7cde53adb4d64e1fba5e9d94d57261ab41443e55b3f318f3762cdc398df7 all runs: crashed: WARNING: bad unlock balance in rcu_core testing current HEAD 0e698dfa282211e414076f9dc7e83c1c288314fd testing commit 0e698dfa282211e414076f9dc7e83c1c288314fd with gcc (GCC) 8.1.0 kernel signature: f141bc0c4b9c5fd0b25400e6bec36dd818ec501da0adda79a5de54cdf01e3df9 all runs: OK # git bisect start 0e698dfa282211e414076f9dc7e83c1c288314fd 5a1e843c66fa6438f389045981c37e4073917641 Bisecting: 22049 revisions left to test after this (roughly 15 steps) [5b8d6e37b519e455661cd847654c2e6ad20b4b1d] mm/page_vma_mapped.c: explicitly compare pfn for normal, hugetlbfs and THP page testing commit 5b8d6e37b519e455661cd847654c2e6ad20b4b1d with gcc (GCC) 8.1.0 kernel signature: c3b39b1512e0f8b960ce87945b377c55fbfe6a1d92f394d51c956828bd51e5c1 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 5b8d6e37b519e455661cd847654c2e6ad20b4b1d Bisecting: 11009 revisions left to test after this (roughly 14 steps) [15c981d16d70e8a5be297fa4af07a64ab7e080ed] Merge tag 'for-5.7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux testing commit 15c981d16d70e8a5be297fa4af07a64ab7e080ed with gcc (GCC) 8.1.0 kernel signature: 24380d4034f41bfe0f17069de40f2e2e104b88c33f39227a24f9f933d80a01b6 all runs: OK # git bisect bad 15c981d16d70e8a5be297fa4af07a64ab7e080ed Bisecting: 5477 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: e70814c14d2d6083db10901610f57bec2be007fc18d5f83c27cd2066355aa911 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 1afa9c3b7c9bdcb562e2afe9f58cc99d0b071cdc Bisecting: 2738 revisions left to test after this (roughly 12 steps) [3a0eb192c01f43dca12628d8b5866d5b8ffb35f5] Merge tag 'for-5.7/libata-2020-03-29' of git://git.kernel.dk/linux-block testing commit 3a0eb192c01f43dca12628d8b5866d5b8ffb35f5 with gcc (GCC) 8.1.0 kernel signature: 1d2ac249a8d7c88766e80eea5fadedd4311f600f9b47fb745175a34e78b087bf 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 3a0eb192c01f43dca12628d8b5866d5b8ffb35f5 Bisecting: 1378 revisions left to test after this (roughly 11 steps) [e129940938d84d8b71074e40a9cc4f69278eb1e1] Merge tag 'regmap-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap testing commit e129940938d84d8b71074e40a9cc4f69278eb1e1 with gcc (GCC) 8.1.0 kernel signature: e89f056809255afd51dc4b239c868dbc1c14e758f83b078883770f648aafd4ee all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good e129940938d84d8b71074e40a9cc4f69278eb1e1 Bisecting: 683 revisions left to test after this (roughly 10 steps) [642e53ead6aea8740a219ede509a5d138fd4f780] Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 642e53ead6aea8740a219ede509a5d138fd4f780 with gcc (GCC) 8.1.0 kernel signature: 0200b96e45d8758baf07d8f117800c7f890d4729c64d125363d02bb837c1da78 run #0: OK run #1: OK run #2: OK run #3: OK run #4: boot failed: can't ssh into the instance run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 642e53ead6aea8740a219ede509a5d138fd4f780 Bisecting: 337 revisions left to test after this (roughly 9 steps) [7c4fa150714fb319d4e2bb2303ebbd7307b0fb6d] Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 7c4fa150714fb319d4e2bb2303ebbd7307b0fb6d with gcc (GCC) 8.1.0 kernel signature: 96422cefb6f7a31426a230cc48e9152676854f45dcfc03167b3f7d9ab47898e5 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 7c4fa150714fb319d4e2bb2303ebbd7307b0fb6d Bisecting: 161 revisions left to test after this (roughly 7 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: 207cb34fc75ed6324a8ba84ac8d26612f23b1b93574fa31bcf1d22af0a454aba all runs: OK # git bisect bad 4b9fd8a829a1eec7442e38afff21d610604de56a Bisecting: 87 revisions left to test after this (roughly 7 steps) [badc61982adb6018a48ed8fe32087b9754cae14b] efi/x86: Add RNG seed EFI table to unencrypted mapping check testing commit badc61982adb6018a48ed8fe32087b9754cae14b with gcc (GCC) 8.1.0 kernel signature: aabb860e65c8906f7ea4b7f65266dbe775908b49f9edbceaae9e60d642942ec2 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good badc61982adb6018a48ed8fe32087b9754cae14b Bisecting: 43 revisions left to test after this (roughly 6 steps) [9e860351550b28901a78f122b1e2dc97f78ba369] m68knommu: Remove mm.h include from uaccess_no.h testing commit 9e860351550b28901a78f122b1e2dc97f78ba369 with gcc (GCC) 8.1.0 kernel signature: 7a18318dd58ea0146854b6dc31048cb926249db2bfa7851b8d7f52d66459cb92 all runs: OK # git bisect bad 9e860351550b28901a78f122b1e2dc97f78ba369 Bisecting: 21 revisions left to test after this (roughly 5 steps) [f6f48e18040402136874a6a71611e081b4d0788a] lockdep: Teach lockdep about "USED" <- "IN-NMI" inversions testing commit f6f48e18040402136874a6a71611e081b4d0788a with gcc (GCC) 8.1.0 kernel signature: ebf1eaaa17ff3c850fa3f18eb708eaf7acfbc19368c75b332aba8a349c5c69f5 all runs: OK # git bisect bad f6f48e18040402136874a6a71611e081b4d0788a Bisecting: 10 revisions left to test after this (roughly 4 steps) [7f26482a872c36b2ee87ea95b9dcd96e3d5805df] locking/percpu-rwsem: Remove the embedded rwsem testing commit 7f26482a872c36b2ee87ea95b9dcd96e3d5805df with gcc (GCC) 8.1.0 kernel signature: 4f11e5816ae2b1ca0c06f3d44b6096f46b631815185edc414f4935e30dcac980 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 7f26482a872c36b2ee87ea95b9dcd96e3d5805df Bisecting: 5 revisions left to test after this (roughly 3 steps) [222993395ed38f3751287f4bd82ef46b3eb3a66d] futex: Remove pointless mmgrap() + mmdrop() testing commit 222993395ed38f3751287f4bd82ef46b3eb3a66d with gcc (GCC) 8.1.0 kernel signature: 6f0c7c56afd328e6b181f387e18e29de40fac9fe6db99c4dc0ad645e2c4348d2 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 222993395ed38f3751287f4bd82ef46b3eb3a66d Bisecting: 2 revisions left to test after this (roughly 2 steps) [25016bd7f4caf5fc983bbab7403d08e64cba3004] locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps() testing commit 25016bd7f4caf5fc983bbab7403d08e64cba3004 with gcc (GCC) 8.1.0 kernel signature: 7d5ffbc8f77656bcdc13e4b34e7a25f456bc332f99ffbb2ba5ed249cb11ca981 all runs: crashed: WARNING: bad unlock balance in rcu_core # git bisect good 25016bd7f4caf5fc983bbab7403d08e64cba3004 Bisecting: 0 revisions left to test after this (roughly 1 step) [248efb2158f1e23750728e92ad9db3ab60c14485] locking/lockdep: Rework lockdep_lock testing commit 248efb2158f1e23750728e92ad9db3ab60c14485 with gcc (GCC) 8.1.0 kernel signature: efc611ebba5a24dbe8aa261d93f6ee46b32bf09cca527c2115322fab7745527c all runs: OK # git bisect bad 248efb2158f1e23750728e92ad9db3ab60c14485 Bisecting: 0 revisions left to test after this (roughly 0 steps) [10476e6304222ced7df9b3d5fb0a043b3c2a1ad8] locking/lockdep: Fix bad recursion pattern testing commit 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 with gcc (GCC) 8.1.0 kernel signature: 03f9b30cafaa7fb05208c9c71dc537ce6f58867f45832c345df56f43b3c8d916 run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: boot failed: can't ssh into the instance run #9: OK # git bisect bad 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 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: 03f9b30cafaa7fb05208c9c71dc537ce6f58867f45832c345df56f43b3c8d916 parent signature: 7d5ffbc8f77656bcdc13e4b34e7a25f456bc332f99ffbb2ba5ed249cb11ca981 revisions tested: 18, total time: 4h0m15.146643198s (build: 1h48m53.886591081s, test: 2h9m28.242886s) 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"]