summaryrefslogtreecommitdiff
path: root/kernel/kcsan/report.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-07-31 12:12:21 +0200
committerIngo Molnar <mingo@kernel.org>2020-07-31 12:13:21 +0200
commitadb334d17858d8b679a41f7f2cd230e5c6accc0a (patch)
treefd4fd188aedd4412b6d1097eb58e0a479bb97596 /kernel/kcsan/report.c
parentf3020b8891b890b48d9e1a83241e3cce518427c1 (diff)
parentf87032aec41e0b00ae5fa9103eb8e7b2d1f8416b (diff)
Merge branch 'WIP.x86/entry' into x86/entry, to merge the latest generic code and resolve conflictsx86-entry-2020-08-04
Pick up and resolve the NMI entry code changes from the locking tree, and also pick up the latest two fixes from tip:core/entry. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/kcsan/report.c')
-rw-r--r--kernel/kcsan/report.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/kcsan/report.c b/kernel/kcsan/report.c
index ac5f8345bae9..6b2fb1a6d8cd 100644
--- a/kernel/kcsan/report.c
+++ b/kernel/kcsan/report.c
@@ -606,10 +606,11 @@ void kcsan_report(const volatile void *ptr, size_t size, int access_type,
goto out;
/*
- * With TRACE_IRQFLAGS, lockdep's IRQ trace state becomes corrupted if
- * we do not turn off lockdep here; this could happen due to recursion
- * into lockdep via KCSAN if we detect a race in utilities used by
- * lockdep.
+ * Because we may generate reports when we're in scheduler code, the use
+ * of printk() could deadlock. Until such time that all printing code
+ * called in print_report() is scheduler-safe, accept the risk, and just
+ * get our message out. As such, also disable lockdep to hide the
+ * warning, and avoid disabling lockdep for the rest of the kernel.
*/
lockdep_off();