Messages in this thread Patch in this message | | | Date | Wed, 20 Jul 2022 22:01:36 +0900 | From | Tetsuo Handa <> | Subject | [PATCH] locking/lockdep: use pr_warn_once for reporting that lockdep is turned off |
| |
debug_show_all_locks() can be called for multiple times if hung_task_call_panic = 0. No need to repeat this message.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> --- kernel/locking/lockdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 64a13eb56078..27be3c83c753 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -6490,7 +6490,7 @@ void debug_show_all_locks(void) struct task_struct *g, *p; if (unlikely(!debug_locks)) { - pr_warn("INFO: lockdep is turned off.\n"); + pr_warn_once("INFO: lockdep is turned off.\n"); return; } pr_warn("\nShowing all locks held in the system:\n"); @@ -6518,7 +6518,7 @@ EXPORT_SYMBOL_GPL(debug_show_all_locks); void debug_show_held_locks(struct task_struct *task) { if (unlikely(!debug_locks)) { - printk("INFO: lockdep is turned off.\n"); + pr_warn_once("INFO: lockdep is turned off.\n"); return; } lockdep_print_held_locks(task); -- 2.18.4
| |