Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-25 Thread Paul E. McKenney
On Fri, Mar 23, 2018 at 10:12:24PM +0100, Thomas Gleixner wrote: > Subject: rcu: Add might_sleep() check to synchronize_rcu() > From: Thomas Gleixner > Date: Fri, 23 Mar 2018 22:02:18 +0100 > > Joel reported a debugobjects warning which is triggered by a RCU callback > invoking synchronize_rcu().

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-25 Thread Paul E. McKenney
On Fri, Mar 23, 2018 at 09:21:05PM -0400, Steven Rostedt wrote: > On Fri, 23 Mar 2018 15:57:04 -0700 > Joel Fernandes wrote: > > > > diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c > > > index 194a7483bb93..857b494bee29 100644 > > > --- a/net/l2tp/l2tp_core.c > > > +++ b/net/l2tp/l2tp_co

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Steven Rostedt
On Fri, 23 Mar 2018 15:57:04 -0700 Joel Fernandes wrote: > > diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c > > index 194a7483bb93..857b494bee29 100644 > > --- a/net/l2tp/l2tp_core.c > > +++ b/net/l2tp/l2tp_core.c > > @@ -1677,6 +1677,8 @@ void __l2tp_session_unhash(struct l2tp_session

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Joel Fernandes
On Fri, Mar 23, 2018 at 2:40 PM, Steven Rostedt wrote: > On Fri, 23 Mar 2018 22:33:29 +0100 (CET) > Thomas Gleixner wrote: > >> On Fri, 23 Mar 2018, Steven Rostedt wrote: >> >> > On Fri, 23 Mar 2018 22:12:24 +0100 (CET) >> > Thomas Gleixner wrote: >> > >> > > synchronize_rcu() lacks a might_slee

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Thomas Gleixner
On Fri, 23 Mar 2018, Steven Rostedt wrote: > On Fri, 23 Mar 2018 22:33:29 +0100 (CET) > [ 150.741223] [] synchronize_rcu+0x27/0x90 > [ 150.746908] [] __l2tp_session_unhash+0x3d5/0x550 > > Looks like __l2tp_session_unhash() is the real culprit here. Yes. I reported that to netdev already. > [

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Steven Rostedt
On Fri, 23 Mar 2018 22:33:29 +0100 (CET) Thomas Gleixner wrote: > On Fri, 23 Mar 2018, Steven Rostedt wrote: > > > On Fri, 23 Mar 2018 22:12:24 +0100 (CET) > > Thomas Gleixner wrote: > > > > > synchronize_rcu() lacks a might_sleep() check which would have caught that > > > issue way earlier

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Thomas Gleixner
On Fri, 23 Mar 2018, Steven Rostedt wrote: > On Fri, 23 Mar 2018 22:12:24 +0100 (CET) > Thomas Gleixner wrote: > > > synchronize_rcu() lacks a might_sleep() check which would have caught that > > issue way earlier because it would trigger with the minimal debug options > > enabled. > > > > Add

Re: rcu: Add might_sleep() check to synchronize_rcu()

2018-03-23 Thread Steven Rostedt
On Fri, 23 Mar 2018 22:12:24 +0100 (CET) Thomas Gleixner wrote: > synchronize_rcu() lacks a might_sleep() check which would have caught that > issue way earlier because it would trigger with the minimal debug options > enabled. > > Add a might_sleep() check to catch such cases. I'm not against