ci starts bisection 2022-11-20 13:23:20.679393593 +0000 UTC m=+170036.749510020 bisecting cause commit starting from 84368d882b9688bfac77ce48d33b1e20a4e4a787 building syzkaller on 5bb7001449cd1dae6cbff2d660374d6d17cbd2c4 ensuring issue is reproducible on original commit 84368d882b9688bfac77ce48d33b1e20a4e4a787 testing commit 84368d882b9688bfac77ce48d33b1e20a4e4a787 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 09c43993f05dc137fc1cc3cabe59c68f79319b983755e2861d2173cc72f5f399 run #0: crashed: inconsistent lock state in sync_info_debugfs_show run #1: crashed: inconsistent lock state in sync_info_debugfs_show run #2: crashed: inconsistent lock state in sync_info_debugfs_show run #3: crashed: inconsistent lock state in sync_info_debugfs_show run #4: crashed: inconsistent lock state in sync_info_debugfs_show run #5: crashed: inconsistent lock state in sync_info_debugfs_show run #6: crashed: inconsistent lock state in sync_info_debugfs_show run #7: crashed: INFO: rcu detected stall in corrupted run #8: crashed: inconsistent lock state in sync_info_debugfs_show run #9: crashed: inconsistent lock state in sync_info_debugfs_show run #10: crashed: inconsistent lock state in sync_info_debugfs_show run #11: crashed: INFO: rcu detected stall in corrupted run #12: crashed: INFO: rcu detected stall in corrupted run #13: crashed: inconsistent lock state in sync_info_debugfs_show run #14: crashed: INFO: rcu detected stall in corrupted run #15: crashed: INFO: rcu detected stall in corrupted run #16: crashed: INFO: rcu detected stall in corrupted run #17: crashed: INFO: rcu detected stall in corrupted run #18: crashed: INFO: rcu detected stall in corrupted run #19: crashed: INFO: rcu detected stall in corrupted testing release v6.0 testing commit 4fe89d07dcc2804c8b562f6c7896a45643d34b2f gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6063f008d290d54b5f7c7c376186b69793c5d26aba646e45f8b8d619942380f4 run #0: crashed: inconsistent lock state in sync_info_debugfs_show run #1: crashed: inconsistent lock state in sync_info_debugfs_show run #2: crashed: INFO: rcu detected stall in corrupted run #3: crashed: INFO: rcu detected stall in corrupted run #4: crashed: INFO: rcu detected stall in corrupted run #5: crashed: INFO: rcu detected stall in corrupted run #6: crashed: INFO: rcu detected stall in corrupted run #7: crashed: INFO: rcu detected stall in corrupted run #8: crashed: INFO: rcu detected stall in corrupted run #9: crashed: INFO: rcu detected stall in corrupted testing release v5.19 testing commit 3d7cb6b04c3f3115719235cc6866b10326de34cd gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 26c5c24ddddc1f875981047c5b233de9e45a78944d7beb9ac84c10dbea914f41 run #0: crashed: inconsistent lock state in sync_info_debugfs_show run #1: crashed: inconsistent lock state in sync_info_debugfs_show run #2: crashed: inconsistent lock state in sync_info_debugfs_show run #3: crashed: inconsistent lock state in sync_info_debugfs_show run #4: crashed: inconsistent lock state in sync_info_debugfs_show run #5: crashed: inconsistent lock state in sync_info_debugfs_show run #6: crashed: inconsistent lock state in sync_info_debugfs_show run #7: crashed: inconsistent lock state in sync_timeline_debug_remove run #8: crashed: inconsistent lock state in sync_info_debugfs_show run #9: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.18 testing commit 4b0986a3613c92f4ec1bdc7f60ec66fea135991f gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: f9c06acd54f1041303228d08e1dda5881844fa21ecdc3c78dc2386f3419a647b all runs: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.17 testing commit f443e374ae131c168a065ea1748feac6b2e76613 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 12ba69757eb06784f393da5eba8b7c11abacae8c81344a19a445d8ee5d14d838 run #0: crashed: inconsistent lock state in sync_info_debugfs_show run #1: crashed: inconsistent lock state in sync_info_debugfs_show run #2: crashed: inconsistent lock state in sync_info_debugfs_show run #3: crashed: inconsistent lock state in sync_info_debugfs_show run #4: crashed: inconsistent lock state in sync_timeline_debug_remove run #5: crashed: inconsistent lock state in sync_info_debugfs_show run #6: crashed: inconsistent lock state in sync_info_debugfs_show run #7: crashed: inconsistent lock state in sync_info_debugfs_show run #8: crashed: inconsistent lock state in sync_info_debugfs_show run #9: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.16 testing commit df0cc57e057f18e44dac8e6c18aba47ab53202f9 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 91992ae05370236a15c26c816558d77c83386bf9091e6e8dd0792886a8799ec0 all runs: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.15 testing commit 8bb7eca972ad531c9b149c0a51ab43a417385813 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e580e1916c288028ff8522073f2e4637c7e66b5acd39e0d3716b038867ddcb21 all runs: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.14 testing commit 7d2a07b769330c34b4deabeed939325c77a7ec2f gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 897d0140c8abe6d8bd09623e0885fe21bcd2137219bf70cf44e8a8f42c6cd97e all runs: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.13 testing commit 62fb9874f5da54fdb243003b386128037319b219 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 471012b8b4b3056603d0fb7a9d0c66eababf88ba66002382dd8c97605521e030 all runs: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.12 testing commit 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a23b052f521de823a202819bf0df903bb2c5b5bdd235b9a685bd4d9dc6ae18ab run #0: crashed: inconsistent lock state in sync_info_debugfs_show run #1: crashed: inconsistent lock state in sync_info_debugfs_show run #2: crashed: inconsistent lock state in sync_info_debugfs_show run #3: crashed: inconsistent lock state in sync_info_debugfs_show run #4: crashed: inconsistent lock state in sync_info_debugfs_show run #5: crashed: inconsistent lock state in sync_info_debugfs_show run #6: crashed: inconsistent lock state in sync_timeline_debug_remove run #7: crashed: inconsistent lock state in sync_info_debugfs_show run #8: crashed: inconsistent lock state in sync_info_debugfs_show run #9: crashed: inconsistent lock state in sync_info_debugfs_show testing release v5.11 testing commit f40ddce88593482919761f74910f42f4b84c004b gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 20819f3d3ae257bd9ba010d364841c868d77fc8fe5ae3766c0a2a39e6b04e49b all runs: OK # git bisect start 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 f40ddce88593482919761f74910f42f4b84c004b Bisecting: 6798 revisions left to test after this (roughly 13 steps) [d99676af540c2dc829999928fb81c58c80a1dce4] Merge tag 'drm-next-2021-02-19' of git://anongit.freedesktop.org/drm/drm testing commit d99676af540c2dc829999928fb81c58c80a1dce4 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c099d683fc9bb931165ec496acd002552630e7841f0fdb251c6a28cba546f233 run #0: crashed: WARNING in kvm_wait run #1: boot failed: WARNING in kvm_wait run #2: boot failed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: boot failed: WARNING in kvm_wait run #6: boot failed: WARNING in kvm_wait run #7: OK run #8: OK run #9: OK reproducer seems to be flaky # git bisect bad d99676af540c2dc829999928fb81c58c80a1dce4 Bisecting: 3717 revisions left to test after this (roughly 12 steps) [f9d58de23152f2c16f326d7e014cfa2933b00304] Merge tag 'affs-for-5.12-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux testing commit f9d58de23152f2c16f326d7e014cfa2933b00304 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 1fb1d1b9f36339a824774bee2b2288b08b8e42d9c608b4e85d54cfad0d0576e6 all runs: OK # git bisect good f9d58de23152f2c16f326d7e014cfa2933b00304 Bisecting: 1854 revisions left to test after this (roughly 11 steps) [de1617578849acab8e16c9ffdce39b91fb50639d] Merge tag 'media/v5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media testing commit de1617578849acab8e16c9ffdce39b91fb50639d gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 46f2180a286b6e7b538e5c1c19d9bea38aa681f2a8cbd431de8747e06a917299 run #0: crashed: WARNING in kvm_wait run #1: crashed: WARNING in kvm_wait run #2: boot failed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: boot failed: WARNING in kvm_wait run #6: boot failed: WARNING in kvm_wait run #7: crashed: WARNING in kvm_wait run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad de1617578849acab8e16c9ffdce39b91fb50639d Bisecting: 929 revisions left to test after this (roughly 10 steps) [4a037ad5d115b2cc79a5071a7854475f365476fa] Merge tag 'for-linus-5.12-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip testing commit 4a037ad5d115b2cc79a5071a7854475f365476fa gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d80e33e989d2f8295530713881852de3c9f461dc634cbc2e26333a7a06bb2ee2 run #0: crashed: WARNING in kvm_wait run #1: crashed: WARNING in kvm_wait run #2: crashed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 4a037ad5d115b2cc79a5071a7854475f365476fa Bisecting: 451 revisions left to test after this (roughly 9 steps) [582cd91f69de8e44857cb610ebca661dac8656b7] Merge tag 'for-5.12/block-2021-02-17' of git://git.kernel.dk/linux-block testing commit 582cd91f69de8e44857cb610ebca661dac8656b7 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 540f45f92341f214d37db153bc7bbfca0c8da10e989938d533fc144cde55917f failed: failed to create VM pool: failed to create GCE image: create image operation failed: &{Code:PERMISSIONS_ERROR ErrorDetails:[] Location: Message:Required 'read' permission for 'disks/ci-upstream-kasan-gce-bisect-job-bisect-job-image.tar.gz' ForceSendFields:[] NullFields:[]}. # git bisect skip 582cd91f69de8e44857cb610ebca661dac8656b7 Bisecting: 451 revisions left to test after this (roughly 9 steps) [622699cfe6ec5578f52727002d5717ff3f092e23] fs-verity: support reading Merkle tree with ioctl testing commit 622699cfe6ec5578f52727002d5717ff3f092e23 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 166a487442dd0fc1d9e8c375237d9de74350c75589ae7173f3c0def267dfd07f all runs: OK # git bisect good 622699cfe6ec5578f52727002d5717ff3f092e23 Bisecting: 451 revisions left to test after this (roughly 9 steps) [cf9a978f9781fb30b778ee61ef6bd164c655d9ff] dcssblk: remove the end of device check in dcssblk_submit_bio testing commit cf9a978f9781fb30b778ee61ef6bd164c655d9ff gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: f2c40118ea262a304c0ba31e94a98da4336f645db6cbc1cc63dd368d8e039dc8 all runs: OK # git bisect good cf9a978f9781fb30b778ee61ef6bd164c655d9ff Bisecting: 451 revisions left to test after this (roughly 9 steps) [ae19aaafae95a5487469433e9cae4c208f8d15cd] torture: Add fuzzed hrtimer-based sleep functions testing commit ae19aaafae95a5487469433e9cae4c208f8d15cd gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0c469a880a8f074b70415245dc8aef88401321f10fd23c724dd53b32a44dabae all runs: OK # git bisect good ae19aaafae95a5487469433e9cae4c208f8d15cd Bisecting: 434 revisions left to test after this (roughly 9 steps) [9820b4dca0f9c6b7ab8b4307286cdace171b724d] Merge tag 'for-5.12/drivers-2021-02-17' of git://git.kernel.dk/linux-block testing commit 9820b4dca0f9c6b7ab8b4307286cdace171b724d gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 636285cd72c95a0c9b1b84654861ba65ec267ef71515d10691ddcbf32507a16f all runs: OK # git bisect good 9820b4dca0f9c6b7ab8b4307286cdace171b724d Bisecting: 230 revisions left to test after this (roughly 8 steps) [3f6ec19f2d05d800bbc42d95dece433da7697864] Merge tag 'timers-core-2021-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 3f6ec19f2d05d800bbc42d95dece433da7697864 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: aa88f64db4a402cef022f1f8fb6bd118d10700fdb98efe284225c3326bb7f139 all runs: OK # git bisect good 3f6ec19f2d05d800bbc42d95dece433da7697864 Bisecting: 114 revisions left to test after this (roughly 7 steps) [2b392cb11c0db645ba81a08b6a2e96c56ec1fc64] Merge branch 'for-mingo-nolibc' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu testing commit 2b392cb11c0db645ba81a08b6a2e96c56ec1fc64 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 00e3f9c029645205c3226ae7eb7c364fdb5177fbe6ee198632cb5f7b469ce73c all runs: OK # git bisect good 2b392cb11c0db645ba81a08b6a2e96c56ec1fc64 Bisecting: 62 revisions left to test after this (roughly 6 steps) [c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4] sched,x86: Allow !PREEMPT_DYNAMIC testing commit c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e1c75286026cbd4ba93e27b51155d85281f021c6936cbc54e23417206506d579 all runs: OK # git bisect good c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4 Bisecting: 33 revisions left to test after this (roughly 5 steps) [9eef02334505411667a7b51a8f349f8c6c4f3b66] Merge tag 'locking-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 9eef02334505411667a7b51a8f349f8c6c4f3b66 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 97734efbc1219091fb1d4472938a954b673d1eb7ebecbcda2ee6250ca5e4f37c run #0: crashed: WARNING in kvm_wait run #1: crashed: WARNING in kvm_wait run #2: crashed: WARNING in kvm_wait run #3: crashed: WARNING in kvm_wait run #4: crashed: WARNING in kvm_wait run #5: boot failed: WARNING in kvm_wait run #6: boot failed: WARNING in kvm_wait run #7: boot failed: WARNING in kvm_wait run #8: boot failed: WARNING in kvm_wait run #9: boot failed: WARNING in kvm_wait run #10: boot failed: WARNING in kvm_wait run #11: boot failed: WARNING in kvm_wait run #12: boot failed: WARNING in kvm_wait run #13: boot failed: WARNING in kvm_wait run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 9eef02334505411667a7b51a8f349f8c6c4f3b66 Bisecting: 14 revisions left to test after this (roughly 4 steps) [442187f3c2de40bab13b8f9751b37925bede73b0] locking/rwsem: Remove empty rwsem.h testing commit 442187f3c2de40bab13b8f9751b37925bede73b0 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 034108496a69327a437b492842242dabb718cc3bee8701f6e9e80e5993bb6660 run #0: crashed: WARNING in kvm_wait run #1: crashed: WARNING in kvm_wait run #2: crashed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: boot failed: WARNING in kvm_wait run #6: boot failed: WARNING in kvm_wait run #7: boot failed: WARNING in kvm_wait run #8: boot failed: WARNING in kvm_wait run #9: boot failed: WARNING in kvm_wait run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 442187f3c2de40bab13b8f9751b37925bede73b0 Bisecting: 6 revisions left to test after this (roughly 3 steps) [7e923e6a3ceb877497dd9ee70d71fa33b94f332b] locking/selftests: Add local_lock inversion tests testing commit 7e923e6a3ceb877497dd9ee70d71fa33b94f332b gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4ab1522fecd0c15653bb098c78ae6283253b8341a7fe9e401faf694347c0e737 all runs: OK # git bisect good 7e923e6a3ceb877497dd9ee70d71fa33b94f332b Bisecting: 2 revisions left to test after this (roughly 2 steps) [1ce53e2c2ac069e7b3c400a427002a70deb4a916] futex: Change utime parameter to be 'const ... *' testing commit 1ce53e2c2ac069e7b3c400a427002a70deb4a916 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d4e91d78453fa12ec8cea51734a536fd2684c61a04b24ab0f31f5af03927ce26 run #0: crashed: WARNING in kvm_wait run #1: boot failed: WARNING in kvm_wait run #2: boot failed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: boot failed: WARNING in kvm_wait run #6: boot failed: WARNING in kvm_wait run #7: boot failed: WARNING in kvm_wait run #8: boot failed: WARNING in kvm_wait run #9: boot failed: WARNING in kvm_wait run #10: boot failed: WARNING in kvm_wait run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 1ce53e2c2ac069e7b3c400a427002a70deb4a916 Bisecting: 1 revision left to test after this (roughly 1 step) [2f0df49c89acaa58571d509830bc481250699885] jump_label: Do not profile branch annotations testing commit 2f0df49c89acaa58571d509830bc481250699885 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4ab1522fecd0c15653bb098c78ae6283253b8341a7fe9e401faf694347c0e737 all runs: OK # git bisect good 2f0df49c89acaa58571d509830bc481250699885 Bisecting: 0 revisions left to test after this (roughly 0 steps) [997acaf6b4b59c6a9c259740312a69ea549cc684] lockdep: report broken irq restoration testing commit 997acaf6b4b59c6a9c259740312a69ea549cc684 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d4e91d78453fa12ec8cea51734a536fd2684c61a04b24ab0f31f5af03927ce26 run #0: boot failed: WARNING in kvm_wait run #1: boot failed: WARNING in kvm_wait run #2: boot failed: WARNING in kvm_wait run #3: boot failed: WARNING in kvm_wait run #4: boot failed: WARNING in kvm_wait run #5: crashed: WARNING in kvm_wait run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 997acaf6b4b59c6a9c259740312a69ea549cc684 997acaf6b4b59c6a9c259740312a69ea549cc684 is the first bad commit commit 997acaf6b4b59c6a9c259740312a69ea549cc684 Author: Mark Rutland Date: Mon Jan 11 15:37:07 2021 +0000 lockdep: report broken irq restoration We generally expect local_irq_save() and local_irq_restore() to be paired and sanely nested, and so local_irq_restore() expects to be called with irqs disabled. Thus, within local_irq_restore() we only trace irq flag changes when unmasking irqs. This means that a sequence such as: | local_irq_disable(); | local_irq_save(flags); | local_irq_enable(); | local_irq_restore(flags); ... is liable to break things, as the local_irq_restore() would mask irqs without tracing this change. Similar problems may exist for architectures whose arch_irq_restore() function depends on being called with irqs disabled. We don't consider such sequences to be a good idea, so let's define those as forbidden, and add tooling to detect such broken cases. This patch adds debug code to WARN() when raw_local_irq_restore() is called with irqs enabled. As raw_local_irq_restore() is expected to pair with raw_local_irq_save(), it should never be called with irqs enabled. To avoid the possibility of circular header dependencies between irqflags.h and bug.h, the warning is handled in a separate C file. The new code is all conditional on a new CONFIG_DEBUG_IRQFLAGS symbol which is independent of CONFIG_TRACE_IRQFLAGS. As noted above such cases will confuse lockdep, so CONFIG_DEBUG_LOCKDEP now selects CONFIG_DEBUG_IRQFLAGS. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210111153707.10071-1-mark.rutland@arm.com include/linux/irqflags.h | 12 ++++++++++++ kernel/locking/Makefile | 1 + kernel/locking/irqflag-debug.c | 11 +++++++++++ lib/Kconfig.debug | 8 ++++++++ 4 files changed, 32 insertions(+) create mode 100644 kernel/locking/irqflag-debug.c culprit signature: d4e91d78453fa12ec8cea51734a536fd2684c61a04b24ab0f31f5af03927ce26 parent signature: 4ab1522fecd0c15653bb098c78ae6283253b8341a7fe9e401faf694347c0e737 Reproducer flagged being flaky revisions tested: 29, total time: 7h27m21.276616319s (build: 3h22m0.560805991s, test: 3h58m28.398132904s) first bad commit: 997acaf6b4b59c6a9c259740312a69ea549cc684 lockdep: report broken irq restoration recipients (to): ["linux-kernel@vger.kernel.org" "mark.rutland@arm.com" "mingo@redhat.com" "peterz@infradead.org" "peterz@infradead.org" "will@kernel.org"] recipients (cc): [] crash: WARNING in kvm_wait ------------[ cut here ]------------ raw_local_irq_restore() called with IRQs enabled WARNING: CPU: 1 PID: 30288 at kernel/locking/irqflag-debug.c:9 warn_bogus_irq_restore kernel/locking/irqflag-debug.c:9 [inline] WARNING: CPU: 1 PID: 30288 at kernel/locking/irqflag-debug.c:9 warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:7 Modules linked in: CPU: 1 PID: 30288 Comm: syz-executor308 Not tainted 5.11.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:warn_bogus_irq_restore kernel/locking/irqflag-debug.c:9 [inline] RIP: 0010:warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:7 Code: 51 00 e9 3f fe ff ff cc cc cc cc cc cc 80 3d 36 db 18 0b 00 74 01 c3 48 c7 c7 60 e7 ca 88 c6 05 25 db 18 0b 01 e8 52 fd d9 06 <0f> 0b c3 48 c7 c0 a0 96 a1 8e 53 48 89 fb 48 ba 00 00 00 00 00 fc RSP: 0018:ffffc90001dbf6b8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88814615f520 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: fffff520003b7ec9 RBP: 0000000000000246 R08: 0000000000000001 R09: ffff8880b9f2015b R10: ffffed10173e402b R11: 0000000000000001 R12: 0000000000000003 R13: ffffed1028c2bea4 R14: 0000000000000001 R15: ffff8880b9f519c0 FS: 0000555555d1e300(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9458bd301d CR3: 000000001d911000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kvm_wait arch/x86/kernel/kvm.c:860 [inline] kvm_wait+0xc3/0xe0 arch/x86/kernel/kvm.c:837 pv_wait arch/x86/include/asm/paravirt.h:564 [inline] pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:470 [inline] __pv_queued_spin_lock_slowpath+0x8b8/0xb40 kernel/locking/qspinlock.c:508 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:554 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:85 [inline] do_raw_spin_lock+0x200/0x2b0 kernel/locking/spinlock_debug.c:113 spin_lock include/linux/spinlock.h:354 [inline] lockref_get_not_dead+0xb/0x60 lib/lockref.c:211 __legitimize_path+0x69/0x160 fs/namei.c:617 unlazy_walk+0xe5/0x2b0 fs/namei.c:693 lookup_fast+0x31f/0x5c0 fs/namei.c:1469 walk_component+0xb1/0x5e0 fs/namei.c:1857 link_path_walk.part.0+0x434/0x9a0 fs/namei.c:2183 link_path_walk fs/namei.c:2113 [inline] path_openat+0x206/0x21d0 fs/namei.c:3367 do_filp_open+0x16d/0x390 fs/namei.c:3398 do_sys_openat2+0x11e/0x360 fs/open.c:1172 do_sys_open fs/open.c:1188 [inline] __do_sys_openat fs/open.c:1204 [inline] __se_sys_openat fs/open.c:1199 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1199 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f9458b51647 Code: 25 00 00 41 00 3d 00 00 41 00 74 47 64 8b 04 25 18 00 00 00 85 c0 75 6b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 95 00 00 00 48 8b 4c 24 28 64 48 2b 0c 25 RSP: 002b:00007ffda7af7be0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f9458b51647 RDX: 0000000000080001 RSI: 00007f9458bd3022 RDI: 00000000ffffff9c RBP: 00007f9458bd3022 R08: 0000000000000000 R09: 00007ffda7af7bd0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080001 R13: 0000000000000000 R14: 00007ffda7af8180 R15: 00007ffda7af8170