Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1565258

Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err
Date 2017-01-23 20:40 +0100
Message-ID <t2SD8-237-15@gated-at.bofh.it> (permalink)
References <t0ODD-6Iu-3@gated-at.bofh.it> <t0R8t-8q4-7@gated-at.bofh.it> <t2aLM-8sX-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jan 21, 2017 at 12:40:23PM -0800, Josh Triplett wrote:
> On Tue, Jan 17, 2017 at 06:53:41PM -0800, Paul E. McKenney wrote:
> > This commit switches RCU suspicious-access splats use pr_err()
> > instead of the current INFO printk()s.  This change makes it easier
> > to automatically classify splats.
> > 
> > Reported-by: Dmitry Vyukov <dvyukov@google.com>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> >  kernel/locking/lockdep.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > index 7c38f8f3d97b..a74c0630172a 100644
> > --- a/kernel/locking/lockdep.c
> > +++ b/kernel/locking/lockdep.c
> > @@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
> >  #endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
> >  	/* Note: the following can be executed concurrently, so be careful. */
> >  	printk("\n");
> > -	printk("===============================\n");
> > -	printk("[ INFO: suspicious RCU usage. ]\n");
> > +	pr_err("===============================\n");
> > +	pr_err("[  suspicious RCU usage.      ]\n");
> 
> While re-adding the square bracket makes it symmetric, this change still
> seems odd, and unrelated to the switch to pr_err.  You could change it
> to "ERR:" if you want, if "INFO:" feels inaccurate to you.

So this would be OK?

	pr_err("[ ERR: suspicious RCU usage.  ]\n");

(Changed to this as a best guess, but please let me know.)

							Thanx, Paul

> >  	print_kernel_ident();
> > -	printk("-------------------------------\n");
> > -	printk("%s:%d %s!\n", file, line, s);
> > -	printk("\nother info that might help us debug this:\n\n");
> > -	printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> > +	pr_err("-------------------------------\n");
> > +	pr_err("%s:%d %s!\n", file, line, s);
> > +	pr_err("\nother info that might help us debug this:\n\n");
> > +	pr_err("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> >  	       !rcu_lockdep_current_cpu_online()
> >  			? "RCU used illegally from offline CPU!\n"
> >  			: !rcu_is_watching()
> > -- 
> > 2.5.2
> > 
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH tip/core/rcu 0/20] Miscellaneous fixes for 4.11 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
  [PATCH v2 tip/core/rcu 01/18] rcu: update: Make RCU_EXPEDITE_BOOT be the default "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
  [PATCH v2 tip/core/rcu 14/18] rcu: Enable RCU tracepoints by default to aid in debugging "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
  [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
    Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
      Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
  [PATCH v2 tip/core/rcu 11/18] rcu: Don't wake rcuc/X kthreads on NOCB CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:10 +0100
  [PATCH v2 tip/core/rcu 15/18] rcu: Fix comment in rcu_organize_nocb_kthreads() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:30 +0100
  [PATCH v2 tip/core/rcu 06/18] rcu: Remove unused but set variable "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:40 +0100
  [PATCH v2 tip/core/rcu 13/18] rcu: Make rcu_cpu_starting() use its "cpu" argument "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:40 +0100
  [PATCH v2 tip/core/rcu 18/18] rcu: Add lockdep checks to synchronous expedited primitives "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:00 +0100
  [PATCH v2 tip/core/rcu 03/18] Fix: Disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:40 +0100
  [PATCH v2 tip/core/rcu 12/18] rcu: Add comment headers to expedited-grace-period counter functions "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:50 +0100
  [PATCH v2 tip/core/rcu 17/18] rcu: Eliminate unused expedited_normal counter "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:50 +0100
  [PATCH v2 tip/core/rcu 16/18] llist: Clarify comments about when locking is needed "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 06:20 +0100
  [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 06:40 +0100
    Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU  suspicious-access splats use pr_err Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
      Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU  suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
        Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU  suspicious-access splats use pr_err Josh Triplett <josh@joshtriplett.org> - 2017-01-23 23:40 +0100
          Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU  suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 01:20 +0100
  [PATCH v2 tip/core/rcu 05/18] rcu: Remove unneeded rcu_process_callbacks() declarations "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 07:10 +0100
  [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 07:10 +0100
    Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
      Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
        Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-23 21:30 +0100
    Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
  [PATCH v3 tip/core/rcu 0/18] Miscellaneous fixes for 4.11 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 17/18] rcu: Eliminate unused expedited_normal counter "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 04/18] rcu: Only dump stalled-tasks stacks if there was a real stall "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 16/18] llist: Clarify comments about when locking is needed "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 06/18] rcu: Remove unused but set variable "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 05/18] rcu: Remove unneeded rcu_process_callbacks() declarations "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 12/18] rcu: Add comment headers to expedited-grace-period counter functions "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 14/18] rcu: Enable RCU tracepoints by default to aid in debugging "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 18/18] rcu: Add lockdep checks to synchronous expedited primitives "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 11/18] rcu: Don't wake rcuc/X kthreads on NOCB CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 13/18] rcu: Make rcu_cpu_starting() use its "cpu" argument "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 10/18] rcu: Re-enable TASKS_RCU for User Mode Linux "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
    [PATCH v3 tip/core/rcu 15/18] rcu: Fix comment in rcu_organize_nocb_kthreads() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100

csiph-web