[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1346968599.1680.55.camel@gandalf.local.home>
Date: Thu, 06 Sep 2012 17:56:39 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: paulmck@...ux.vnet.ibm.com
Cc: Fengguang Wu <fengguang.wu@...el.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: lockdep WARNING on check_critical_timing()
On Thu, 2012-09-06 at 14:29 -0700, Paul E. McKenney wrote:
>
> > Didn't we talk about having the rcu_dereference_raw() not do the check?
> > The function tracer is just too invasive to add work arounds to prevent
> > lockdep from screaming about it.
>
> Actually, rcu_dereference_raw() is already supposed to bypass the
> lockdep checks. And the code looks to me like it does the bypass,
> OR-ing "1" into the asssertion condition.
>
> So what am I missing here?
>From my tree, I see:
#define rcu_dereference_raw(p) rcu_dereference_check(p, 1)
#define rcu_dereference_check(p, c) \
__rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu)
Note the 'c' comes after rcu_read_lock_held()
static inline int rcu_read_lock_held(void)
{
if (!debug_lockdep_rcu_enabled())
return 1;
if (rcu_is_cpu_idle())
return 0;
if (!rcu_lockdep_current_cpu_online())
return 0;
return lock_is_held(&rcu_lock_map);
}
Then when lock_is_held() is called, we get the false warning message.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists