[Intel-gfx] [PATCH] RFC: hung_task: taint kernel

Daniel Vetter daniel.vetter at ffwll.ch
Thu May 2 20:46:48 UTC 2019


There's the hung_task_panic sysctl, but that's a bit an extreme measure.
As a fallback taint at least the machine.

Our CI uses this to decide when a reboot is necessary, plus to figure
out whether the kernel is still happy.

v2: Works much better when I put the else { add_taint() } at the right
place.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
Cc: Dmitry Vyukov <dvyukov at google.com>
Cc: "Paul E. McKenney" <paulmck at linux.ibm.com>
Cc: Valdis Kletnieks <valdis.kletnieks at vt.edu>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Vitaly Kuznetsov <vkuznets at redhat.com>
Cc: "Liu, Chuansheng" <chuansheng.liu at intel.com>
---
 kernel/hung_task.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index f108a95882c6..d90d98f53ccb 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -117,6 +117,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
 		console_verbose();
 		hung_task_show_lock = true;
 		hung_task_call_panic = true;
+	} else {
+		add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
 	}
 
 	/*
-- 
2.20.1



More information about the Intel-gfx mailing list