Re: [PATCH tip/core/rcu 02/13] lockdep: Use "WARNING" tag on lockdep splats

From: Paul E. McKenney
Date: Thu Apr 13 2017 - 12:01:53 EST


On Thu, Apr 13, 2017 at 11:14:18AM +0200, Peter Zijlstra wrote:
> On Wed, Apr 12, 2017 at 09:55:38AM -0700, Paul E. McKenney wrote:
> > This commit changes lockdep splats to begin lines with "WARNING" and
> > to use pr_warn() instead of printk(). This change eases scripted
> > analysis of kernel console output.
> >
> > Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> > Reported-by: Ingo Molnar <mingo@xxxxxxxxxx>
> > Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> > Acked-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> > ---
> > kernel/locking/lockdep.c | 86 +++++++++++++++++++++---------------------
> > kernel/locking/rtmutex-debug.c | 9 +++--
> > 2 files changed, 48 insertions(+), 47 deletions(-)
> >
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > index a95e5d1f4a9c..e9d4f85b290c 100644
> > --- a/kernel/locking/lockdep.c
> > +++ b/kernel/locking/lockdep.c
> > @@ -1144,10 +1144,10 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth,
> > return 0;
> >
> > printk("\n");
> > - printk("======================================================\n");
> > - printk("[ INFO: possible circular locking dependency detected ]\n");
> > + pr_warn("======================================================\n");
> > + pr_warn("WARNING: possible circular locking dependency detected\n");
> > print_kernel_ident();
> > - printk("-------------------------------------------------------\n");
> > + pr_warn("------------------------------------------------------\n");
> > printk("%s/%d is trying to acquire lock:\n",
> > curr->comm, task_pid_nr(curr));
> > print_lock(check_src);
>
> Blergh, not a fan of this patch. Now we have an odd mix of pr_crap() and
> printk().

Would you be OK with all of the lockdep messages being updated to
WARNING rather than just the RCU-related ones?

Thanx, Paul