bisecting cause commit starting from 6174f05255e65622ff3340257879a4c0f858b0df building syzkaller on a0092f9dfdd33924abe5cf5565e4ec4748217c7b testing commit 6174f05255e65622ff3340257879a4c0f858b0df with gcc (GCC) 8.1.0 kernel signature: ef326bb9272caddacae59bcaa4ec547cfaa3cd6d5ebdff7850a75f22fd0c6749 all runs: crashed: WARNING in close_fs_devices testing release v5.9 testing commit bbf5c979011a099af5dc76498918ed7df445635b with gcc (GCC) 8.1.0 kernel signature: ae997c81c8480492441e712d3c127e3da959156d4e937c464609e101fa84e28c all runs: OK # git bisect start 6174f05255e65622ff3340257879a4c0f858b0df bbf5c979011a099af5dc76498918ed7df445635b Bisecting: 12846 revisions left to test after this (roughly 14 steps) [ceae608a54898fff2aa0aba358fe81af027ef8c9] Merge tag 'pwm/for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm testing commit ceae608a54898fff2aa0aba358fe81af027ef8c9 with gcc (GCC) 8.1.0 kernel signature: 9f4d3a5afb1f2fdc7b7125ae2f9cf8aad1d13d4610dc947aa17143e4137c6b6e all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad ceae608a54898fff2aa0aba358fe81af027ef8c9 Bisecting: 5868 revisions left to test after this (roughly 13 steps) [93b694d096cc10994c817730d4d50288f9ae3d66] Merge tag 'drm-next-2020-10-15' of git://anongit.freedesktop.org/drm/drm testing commit 93b694d096cc10994c817730d4d50288f9ae3d66 with gcc (GCC) 8.1.0 kernel signature: 4f10c361717c95173550c829ef9109401c752299afed4421267574182ac7e1c3 all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad 93b694d096cc10994c817730d4d50288f9ae3d66 Bisecting: 3475 revisions left to test after this (roughly 12 steps) [4815519ed0af833884ce9c288183bf1ae3cb9caa] Merge tag 'for-5.10/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm testing commit 4815519ed0af833884ce9c288183bf1ae3cb9caa with gcc (GCC) 8.1.0 kernel signature: 80301eb5567ef4cd10438dab40fcb934f8bea4d1633f699d9734c090c2c2df41 all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad 4815519ed0af833884ce9c288183bf1ae3cb9caa Bisecting: 1507 revisions left to test after this (roughly 11 steps) [fd5c32d80884268a381ed0e67cccef0b3d37750b] Merge tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media testing commit fd5c32d80884268a381ed0e67cccef0b3d37750b with gcc (GCC) 8.1.0 kernel signature: 8414ad3403b90ecaa7bf3116ca93cfb63db209a1638cc0fb38bb96f9dba3c2f5 all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad fd5c32d80884268a381ed0e67cccef0b3d37750b Bisecting: 1062 revisions left to test after this (roughly 10 steps) [865c50e1d279671728c2936cb7680eb89355eeea] x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT testing commit 865c50e1d279671728c2936cb7680eb89355eeea with gcc (GCC) 8.1.0 kernel signature: ae41957fdd2a576c8c1619b044a5bc4d71b08c295f5c7857ad7c05e43dcf8cae all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad 865c50e1d279671728c2936cb7680eb89355eeea Bisecting: 429 revisions left to test after this (roughly 9 steps) [13cb73490f475f8e7669f9288be0bcfa85399b1f] Merge tag 'x86-entry-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 13cb73490f475f8e7669f9288be0bcfa85399b1f with gcc (GCC) 8.1.0 kernel signature: bf634a36c8f4cd2aaa0eea5ca998e76846c49adff18b3226358ae0504487e134 all runs: OK # git bisect good 13cb73490f475f8e7669f9288be0bcfa85399b1f Bisecting: 228 revisions left to test after this (roughly 8 steps) [dd502a81077a5f3b3e19fa9a1accffdcab5ad5bc] Merge tag 'core-static_call-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit dd502a81077a5f3b3e19fa9a1accffdcab5ad5bc with gcc (GCC) 8.1.0 kernel signature: 9a3381d8eb414fdaa36e418e92aade0576e9122921add96b4059f0edf4678f23 all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad dd502a81077a5f3b3e19fa9a1accffdcab5ad5bc Bisecting: 86 revisions left to test after this (roughly 7 steps) [ed016af52ee3035b4799ebd7d53f9ae59d5782c4] Merge tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit ed016af52ee3035b4799ebd7d53f9ae59d5782c4 with gcc (GCC) 8.1.0 kernel signature: 8684ac24fb35a0bc25f8e326780c8c1a4a5eac5ab4f77e8e331834672a4961bd all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad ed016af52ee3035b4799ebd7d53f9ae59d5782c4 Bisecting: 49 revisions left to test after this (roughly 6 steps) [d6c4c11348816fb4d16e33bf47d559d7aa59350a] Merge branch 'kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core testing commit d6c4c11348816fb4d16e33bf47d559d7aa59350a with gcc (GCC) 8.1.0 kernel signature: 403e80aa19ac26b21835f6db0ca77f9a9085613f849524b12bd462222146906a all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad d6c4c11348816fb4d16e33bf47d559d7aa59350a Bisecting: 31 revisions left to test after this (roughly 5 steps) [6dd699b13d53f26a7603702d8bada3482312df74] seqlock: seqcount_LOCKNAME_t: Standardize naming convention testing commit 6dd699b13d53f26a7603702d8bada3482312df74 with gcc (GCC) 8.1.0 kernel signature: 3232b06c18182478cb224ad34117f8ddb5de38531250e3b51566f66440b0b2bf all runs: OK # git bisect good 6dd699b13d53f26a7603702d8bada3482312df74 Bisecting: 15 revisions left to test after this (roughly 4 steps) [178a1877d782c034f466edd80e30a107af5469df] kcsan: Use pr_fmt for consistency testing commit 178a1877d782c034f466edd80e30a107af5469df with gcc (GCC) 8.1.0 kernel signature: 37ccb0a7381ec1b422a09adafa60b0210be501ea0aec0d6ed35ed69588779b16 all runs: OK # git bisect good 178a1877d782c034f466edd80e30a107af5469df Bisecting: 7 revisions left to test after this (roughly 3 steps) [d89d5f855f84ccf3f7e648813b4bb95c780bd7cd] locking/atomics: Check atomic-arch-fallback.h too testing commit d89d5f855f84ccf3f7e648813b4bb95c780bd7cd with gcc (GCC) 8.1.0 kernel signature: e341e399ddc178fec42f666f43326be3ea2299bae63e1e67b5fc14dd937eecf0 all runs: OK # git bisect good d89d5f855f84ccf3f7e648813b4bb95c780bd7cd Bisecting: 3 revisions left to test after this (roughly 2 steps) [e705d397965811ac528d7213b42d74ffe43caf38] Merge branch 'locking/urgent' into locking/core, to pick up fixes testing commit e705d397965811ac528d7213b42d74ffe43caf38 with gcc (GCC) 8.1.0 kernel signature: ef309669b251d01f1e6d713a814f022e5cc61efff275af9c3ae57c1c7e6e1147 all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad e705d397965811ac528d7213b42d74ffe43caf38 Bisecting: 1 revision left to test after this (roughly 1 step) [4d004099a668c41522242aa146a38cc4eb59cb1e] lockdep: Fix lockdep recursion testing commit 4d004099a668c41522242aa146a38cc4eb59cb1e with gcc (GCC) 8.1.0 kernel signature: 18239ed3b96c7645f2873062a97ea4f24dcb3493113e40995a25ef7fe2bb96bb all runs: crashed: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on # git bisect bad 4d004099a668c41522242aa146a38cc4eb59cb1e Bisecting: 0 revisions left to test after this (roughly 0 steps) [2bb8945bcc1a768f2bc402a16c9610bba8d5187d] lockdep: Fix usage_traceoverflow testing commit 2bb8945bcc1a768f2bc402a16c9610bba8d5187d with gcc (GCC) 8.1.0 kernel signature: 5f4185eee518bf1204e5582dae12588b3f76db1259eab9fb33cf92f5dd0c26b4 all runs: OK # git bisect good 2bb8945bcc1a768f2bc402a16c9610bba8d5187d 4d004099a668c41522242aa146a38cc4eb59cb1e is the first bad commit commit 4d004099a668c41522242aa146a38cc4eb59cb1e Author: Peter Zijlstra Date: Fri Oct 2 11:04:21 2020 +0200 lockdep: Fix lockdep recursion Steve reported that lockdep_assert*irq*(), when nested inside lockdep itself, will trigger a false-positive. One example is the stack-trace code, as called from inside lockdep, triggering tracing, which in turn calls RCU, which then uses lockdep_assert_irqs_disabled(). Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") Reported-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar include/linux/lockdep.h | 13 ++++--- kernel/locking/lockdep.c | 99 +++++++++++++++++++++++++++++------------------- 2 files changed, 67 insertions(+), 45 deletions(-) culprit signature: 18239ed3b96c7645f2873062a97ea4f24dcb3493113e40995a25ef7fe2bb96bb parent signature: 5f4185eee518bf1204e5582dae12588b3f76db1259eab9fb33cf92f5dd0c26b4 revisions tested: 17, total time: 2h49m59.961331581s (build: 1h14m40.497733132s, test: 1h33m42.02885548s) first bad commit: 4d004099a668c41522242aa146a38cc4eb59cb1e lockdep: Fix lockdep recursion recipients (to): ["linux-kernel@vger.kernel.org" "mingo@kernel.org" "mingo@redhat.com" "peterz@infradead.org" "peterz@infradead.org" "will@kernel.org"] recipients (cc): [] crash: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on BUG: using __this_cpu_read() in preemptible [00000000] code: syz-executor.5/10220 caller is lockdep_hardirqs_on_prepare+0x2f/0x1a0 kernel/locking/lockdep.c:3684 CPU: 1 PID: 10220 Comm: syz-executor.5 Not tainted 5.9.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:77 [inline] dump_stack+0x77/0xa0 lib/dump_stack.c:118 check_preemption_disabled+0xab/0xc0 lib/smp_processor_id.c:48 lockdep_hardirqs_on_prepare+0x2f/0x1a0 kernel/locking/lockdep.c:3684 trace_hardirqs_on+0x1c/0x100 kernel/trace/trace_preemptirq.c:49 __bad_area_nosemaphore+0x5e/0x1c0 arch/x86/mm/fault.c:797 do_user_addr_fault arch/x86/mm/fault.c:1345 [inline] handle_page_fault arch/x86/mm/fault.c:1429 [inline] exc_page_fault+0x587/0x690 arch/x86/mm/fault.c:1482 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:538 RIP: 0033:0x43c4f6 Code: 00 0f 1f 00 66 0f ef c0 66 0f ef c9 66 0f ef d2 66 0f ef db 48 89 f8 48 89 f9 48 81 e1 ff 0f 00 00 48 81 f9 cf 0f 00 00 77 6a 0f 6f 20 66 0f 74 e0 66 0f d7 d4 85 d2 74 04 0f bc c2 c3 48 83 RSP: 002b:00007fa06f412a88 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00007fa06f412b20 RCX: 0000000000000000 RDX: 0000000000000005 RSI: 00000000000001ff RDI: 0000000000000000 RBP: 00007fa06f412ae0 R08: 0000000020000ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000213 R12: 0000000020000000 R13: 0000000000000000 R14: 0000000020000200 R15: 0000000000000000 BUG: using __this_cpu_read() in preemptible [00000000] code: syz-executor.5/10220 caller is lockdep_hardirqs_on+0x38/0x110 kernel/locking/lockdep.c:3753 CPU: 1 PID: 10220 Comm: syz-executor.5 Not tainted 5.9.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:77 [inline] dump_stack+0x77/0xa0 lib/dump_stack.c:118 check_preemption_disabled+0xab/0xc0 lib/smp_processor_id.c:48 lockdep_hardirqs_on+0x38/0x110 kernel/locking/lockdep.c:3753 __bad_area_nosemaphore+0x5e/0x1c0 arch/x86/mm/fault.c:797 do_user_addr_fault arch/x86/mm/fault.c:1345 [inline] handle_page_fault arch/x86/mm/fault.c:1429 [inline] exc_page_fault+0x587/0x690 arch/x86/mm/fault.c:1482 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:538 RIP: 0033:0x43c4f6 Code: 00 0f 1f 00 66 0f ef c0 66 0f ef c9 66 0f ef d2 66 0f ef db 48 89 f8 48 89 f9 48 81 e1 ff 0f 00 00 48 81 f9 cf 0f 00 00 77 6a 0f 6f 20 66 0f 74 e0 66 0f d7 d4 85 d2 74 04 0f bc c2 c3 48 83 RSP: 002b:00007fa06f412a88 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00007fa06f412b20 RCX: 0000000000000000 RDX: 0000000000000005 RSI: 00000000000001ff RDI: 0000000000000000 RBP: 00007fa06f412ae0 R08: 0000000020000ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000213 R12: 0000000020000000 R13: 0000000000000000 R14: 0000000020000200 R15: 0000000000000000