lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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
\
 
 \ /
  Last update: 2022-07-20 15:03    [W:0.059 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site