lkml.org 
[lkml]   [2015]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] soft lockup: kill realtime threads before panic
Date
From: Joern Engel <joern@logfs.org>

We have observed cases where the soft lockup detector triggered, but no
kernel bug existed. Instead we had a buggy realtime thread that
monopolized a cpu. So let's kill the responsible party and not panic
the entire system.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Spencer Baugh <sbaugh@catern.com>
---
kernel/watchdog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index a6ffa43..2355bd5 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -428,7 +428,10 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
}

add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
- if (softlockup_panic)
+ if (rt_prio(current->prio)) {
+ pr_emerg("killing realtime thread\n");
+ send_sig(SIGILL, current, 0);
+ } else if (softlockup_panic)
panic("softlockup: hung tasks");
__this_cpu_write(soft_watchdog_warn, true);
} else
--
2.4.3


\
 
 \ /
  Last update: 2015-07-22 00:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog