* Re: [rcu:rcu/dev 70/71] kernel/rcu/sync.c:68:2: warning: 'deprecate_rcu_lockdep_assert' is deprecated (declared at include/linux/rcupdate.h:541) [not found] ` <20150912171703.GK4029@linux.vnet.ibm.com> @ 2015-09-14 15:55 ` Oleg Nesterov 2015-09-14 16:28 ` Paul E. McKenney 0 siblings, 1 reply; 2+ messages in thread From: Oleg Nesterov @ 2015-09-14 15:55 UTC (permalink / raw) To: Paul E. McKenney; +Cc: kbuild test robot, kbuild-all, linux-kernel On 09/12, Paul E. McKenney wrote: > > I should have noticed this... Heh, me too :/ Thanks a lot Fengguang! > The new rcu_lockdep_assert() is RCU_LOCKDEP_WARN(). I am guessing > that you would like to also make rcu_sync_lockdep_assert() be > RCU_SYNC_LOCKDEP_WARN()? I am fine either way. Unless you have already fixed this in your tree, I'd suggest the trivial fix below. But please let me know you want me to make another trivial change which turns rcu_sync_lockdep_assert() into bool rcu_sync_read_lock_held(struct rcu_sync *rsp) { return gp_ops[rsp->gp_type].held(); } and rcu_sync_is_idle() into static inline bool rcu_sync_is_idle(struct rcu_sync *rsp) { RCU_LOCKDEP_WARN(!rcu_sync_read_lock_held(rsp), "suspicious rcu_sync_is_idle() usage"); return !rsp->gp_state; /* GP_IDLE */ } ------------------------------------------------------------------------------- >From 37fb0c136b979b0ef6a4ade1c7a14c8207533b2d Mon Sep 17 00:00:00 2001 From: Oleg Nesterov <oleg@redhat.com> Date: Mon, 14 Sep 2015 10:54:10 -0400 Subject: [PATCH] rcu_sync: Use RCU_LOCKDEP_WARN() rather than rcu_lockdep_assert() rcu_lockdep_assert() is deprecated, change rcu_sync_lockdep_assert() to use RCU_LOCKDEP_WARN(). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> --- kernel/rcu/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c index 56ae79d..be922c9 100644 --- a/kernel/rcu/sync.c +++ b/kernel/rcu/sync.c @@ -65,8 +65,8 @@ enum { CB_IDLE = 0, CB_PENDING, CB_REPLAY }; #ifdef CONFIG_PROVE_RCU void rcu_sync_lockdep_assert(struct rcu_sync *rsp) { - rcu_lockdep_assert(gp_ops[rsp->gp_type].held(), - "suspicious rcu_sync_is_idle() usage"); + RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(), + "suspicious rcu_sync_is_idle() usage"); } #endif -- 2.4.3 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [rcu:rcu/dev 70/71] kernel/rcu/sync.c:68:2: warning: 'deprecate_rcu_lockdep_assert' is deprecated (declared at include/linux/rcupdate.h:541) 2015-09-14 15:55 ` [rcu:rcu/dev 70/71] kernel/rcu/sync.c:68:2: warning: 'deprecate_rcu_lockdep_assert' is deprecated (declared at include/linux/rcupdate.h:541) Oleg Nesterov @ 2015-09-14 16:28 ` Paul E. McKenney 0 siblings, 0 replies; 2+ messages in thread From: Paul E. McKenney @ 2015-09-14 16:28 UTC (permalink / raw) To: Oleg Nesterov; +Cc: kbuild test robot, kbuild-all, linux-kernel On Mon, Sep 14, 2015 at 05:55:20PM +0200, Oleg Nesterov wrote: > On 09/12, Paul E. McKenney wrote: > > > > I should have noticed this... > > Heh, me too :/ > > Thanks a lot Fengguang! > > > The new rcu_lockdep_assert() is RCU_LOCKDEP_WARN(). I am guessing > > that you would like to also make rcu_sync_lockdep_assert() be > > RCU_SYNC_LOCKDEP_WARN()? > > I am fine either way. Unless you have already fixed this in your tree, > I'd suggest the trivial fix below. I got that one, but failed to clean up the indentation. Fixed that as well. > But please let me know you want me to make another trivial change which > turns rcu_sync_lockdep_assert() into > > bool rcu_sync_read_lock_held(struct rcu_sync *rsp) > { > return gp_ops[rsp->gp_type].held(); > } > > and rcu_sync_is_idle() into > > static inline bool rcu_sync_is_idle(struct rcu_sync *rsp) > { > RCU_LOCKDEP_WARN(!rcu_sync_read_lock_held(rsp), > "suspicious rcu_sync_is_idle() usage"); > return !rsp->gp_state; /* GP_IDLE */ > } There does seem to be a strong desire to move away from "assert" to "WARN", so please do! Thanx, Paul > ------------------------------------------------------------------------------- > >From 37fb0c136b979b0ef6a4ade1c7a14c8207533b2d Mon Sep 17 00:00:00 2001 > From: Oleg Nesterov <oleg@redhat.com> > Date: Mon, 14 Sep 2015 10:54:10 -0400 > Subject: [PATCH] rcu_sync: Use RCU_LOCKDEP_WARN() rather than rcu_lockdep_assert() > > rcu_lockdep_assert() is deprecated, change rcu_sync_lockdep_assert() > to use RCU_LOCKDEP_WARN(). > > Reported-by: Fengguang Wu <fengguang.wu@intel.com> > Signed-off-by: Oleg Nesterov <oleg@redhat.com> > --- > kernel/rcu/sync.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c > index 56ae79d..be922c9 100644 > --- a/kernel/rcu/sync.c > +++ b/kernel/rcu/sync.c > @@ -65,8 +65,8 @@ enum { CB_IDLE = 0, CB_PENDING, CB_REPLAY }; > #ifdef CONFIG_PROVE_RCU > void rcu_sync_lockdep_assert(struct rcu_sync *rsp) > { > - rcu_lockdep_assert(gp_ops[rsp->gp_type].held(), > - "suspicious rcu_sync_is_idle() usage"); > + RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(), > + "suspicious rcu_sync_is_idle() usage"); > } > #endif > > -- > 2.4.3 > > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-14 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201509122015.wgq37YmO%fengguang.wu@intel.com>
[not found] ` <20150912171703.GK4029@linux.vnet.ibm.com>
2015-09-14 15:55 ` [rcu:rcu/dev 70/71] kernel/rcu/sync.c:68:2: warning: 'deprecate_rcu_lockdep_assert' is deprecated (declared at include/linux/rcupdate.h:541) Oleg Nesterov
2015-09-14 16:28 ` Paul E. McKenney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).