From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: [PATCH 2/2] RFC: soft/hardlookup: taint kernel Date: Thu, 2 May 2019 21:42:08 +0200 Message-ID: <20190502194208.3535-2-daniel.vetter@ffwll.ch> References: <20190502194208.3535-1-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190502194208.3535-1-daniel.vetter@ffwll.ch> Sender: linux-kernel-owner@vger.kernel.org To: Intel Graphics Development Cc: LKML , Daniel Vetter , Daniel Vetter , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Valdis Kletnieks , Laurence Oberman , Vincent Whitchurch , Don Zickus , Andrew Morton , Sergey Senozhatsky , Sinan Kaya List-Id: intel-gfx@lists.freedesktop.org There's the soft/hardlookup_panic sysctls, 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. Signed-off-by: Daniel Vetter Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Valdis Kletnieks Cc: Laurence Oberman Cc: Vincent Whitchurch Cc: Don Zickus Cc: Andrew Morton Cc: Sergey Senozhatsky Cc: Sinan Kaya Cc: Daniel Vetter --- kernel/watchdog.c | 2 ++ kernel/watchdog_hld.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 6a5787233113..de7a60503517 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -469,6 +469,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); if (softlockup_panic) panic("softlockup: hung tasks"); + else + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); __this_cpu_write(soft_watchdog_warn, true); } else __this_cpu_write(soft_watchdog_warn, false); diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index 247bf0b1582c..cce46cf75d76 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c @@ -154,6 +154,8 @@ static void watchdog_overflow_callback(struct perf_event *event, if (hardlockup_panic) nmi_panic(regs, "Hard LOCKUP"); + else + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); __this_cpu_write(hard_watchdog_warn, true); return; -- 2.20.1