diff options
| author | Tejun Heo <tj@kernel.org> | 2018-01-22 14:00:55 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-02 18:12:21 +0200 |
| commit | 1cd55f2dc2d95b038b183f473378077d88b44378 (patch) | |
| tree | 4a06267efc23aa660b17ce1d6852986565177184 /kernel/lockdep.c | |
| parent | c7a630bd6759398cf1726241ea563a703d2b42cc (diff) | |
locking/lockdep: Avoid triggering hardlockup from debug_show_all_locks()
debug_show_all_locks() iterates all tasks and print held locks whole
holding tasklist_lock. This can take a while on a slow console device
and may end up triggering NMI hardlockup detector if someone else ends
up waiting for tasklist_lock.
Touch the NMI watchdog while printing the held locks to avoid
spuriously triggering the hardlockup detector.
Change-Id: I8ed50849c4464de1e2936d75b945e568a6090561
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-team@fb.com
Link: http://lkml.kernel.org/r/20180122220055.GB1771050@devbig577.frc2.facebook.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/lockdep.c')
| -rw-r--r-- | kernel/lockdep.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 0fd7a64bd..38095d441 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -44,6 +44,7 @@ #include <linux/bitops.h> #include <linux/gfp.h> #include <linux/kmemcheck.h> +#include <linux/nmi.h> #include <linux/aee.h> #include <asm/sections.h> @@ -4216,6 +4217,7 @@ retry: if (!unlock) if (read_trylock(&tasklist_lock)) unlock = 1; + touch_nmi_watchdog(); } while_each_thread(g, p); printk("\n"); |
