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)

From: Oleg Nesterov
Date: Mon Sep 14 2015 - 11:58:16 EST


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 */
}

-------------------------------------------------------------------------------