From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH] lockdep: Mark up lock disabling with TAINT_CRAP
Date: Tue, 5 Dec 2017 15:31:11 +0000 [thread overview]
Message-ID: <20171205153111.8504-1-chris@chris-wilson.co.uk> (raw)
When testing with lockdep disabled, if it becomes disabled due to some
error or other that makes subsequenting testing incomplete, it taints
the test result. Make this obvious to the test infrastructure by adding
TAINT_CRAP.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
Thoughts? Preferred over parsing lock_stats in addition to kernel/taint?
Downside is that since locks are disabled before oops printing and the
like, we will see TAINT_CRAP on first oops/panic (I think) rather than
subsequent oopses.
-Chris
---
kernel/panic.c | 4 +++-
lib/debug_locks.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index 2cfef408fec9..f4ba13e94be6 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -392,8 +392,10 @@ unsigned long get_taint(void)
*/
void add_taint(unsigned flag, enum lockdep_ok lockdep_ok)
{
- if (lockdep_ok == LOCKDEP_NOW_UNRELIABLE && __debug_locks_off())
+ if (lockdep_ok == LOCKDEP_NOW_UNRELIABLE && __debug_locks_off()) {
pr_warn("Disabling lock debugging due to kernel taint\n");
+ set_bit(TAINT_CRAP, &tainted_mask);
+ }
set_bit(flag, &tainted_mask);
}
diff --git a/lib/debug_locks.c b/lib/debug_locks.c
index 96c4c633d95e..8abe7bb50842 100644
--- a/lib/debug_locks.c
+++ b/lib/debug_locks.c
@@ -38,6 +38,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent);
int debug_locks_off(void)
{
if (__debug_locks_off()) {
+ add_taint(TAINT_CRAP, LOCKDEP_STILL_OK);
if (!debug_locks_silent) {
console_verbose();
return 1;
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-12-05 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 15:31 Chris Wilson [this message]
2017-12-05 16:57 ` ✓ Fi.CI.BAT: success for lockdep: Mark up lock disabling with TAINT_CRAP Patchwork
2017-12-05 21:05 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171205153111.8504-1-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomi.p.sarvela@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.