From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933083AbeAXKmk (ORCPT ); Wed, 24 Jan 2018 05:42:40 -0500 Received: from terminus.zytor.com ([65.50.211.136]:50961 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932953AbeAXKmh (ORCPT ); Wed, 24 Jan 2018 05:42:37 -0500 Date: Wed, 24 Jan 2018 02:38:22 -0800 From: tip-bot for Tejun Heo Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org, mingo@kernel.org, tj@kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de Reply-To: tj@kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org In-Reply-To: <20180122220055.GB1771050@devbig577.frc2.facebook.com> References: <20180122220055.GB1771050@devbig577.frc2.facebook.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/urgent] locking/lockdep: Avoid triggering hardlockup from debug_show_all_locks() Git-Commit-ID: 88f1c87de11a86d839f4ce5313e552d96709b990 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 88f1c87de11a86d839f4ce5313e552d96709b990 Gitweb: https://git.kernel.org/tip/88f1c87de11a86d839f4ce5313e552d96709b990 Author: Tejun Heo AuthorDate: Mon, 22 Jan 2018 14:00:55 -0800 Committer: Ingo Molnar CommitDate: Wed, 24 Jan 2018 10:00:09 +0100 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. Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/20180122220055.GB1771050@devbig577.frc2.facebook.com Signed-off-by: Ingo Molnar --- kernel/locking/lockdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 5fa1324..5216590 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -49,6 +49,7 @@ #include #include #include +#include #include @@ -4490,6 +4491,7 @@ retry: if (!unlock) if (read_trylock(&tasklist_lock)) unlock = 1; + touch_nmi_watchdog(); } while_each_thread(g, p); pr_warn("\n");