Re: [PATCH] RCU: don't turn off lockdep when find suspiciousrcu_dereference_check() usage

From: Paul E. McKenney
Date: Tue Apr 20 2010 - 09:29:01 EST


On Tue, Apr 20, 2010 at 08:31:56AM -0400, Eric Paris wrote:
> On Tue, 2010-04-20 at 16:23 +0800, Lai Jiangshan wrote:
>
> > [PATCH] RCU: don't turn off lockdep when find suspicious rcu_dereference_check() usage
> >
> > When suspicious rcu_dereference_check() usage is detected, lockdep is still
> > available actually, so we should not call debug_locks_off() in
> > lockdep_rcu_dereference().
> >
> > For get rid of too much "suspicious rcu_dereference_check() usage"
> > output when the "if(!debug_locks_off())" statement is removed. This patch uses
> > static variable '__warned's for very usage of "rcu_dereference*()".
> >
> > One variable per usage, so, Now, we can get multiple complaint
> > when we detect multiple different suspicious rcu_dereference_check() usage.
> >
> > Requested-by: Eric Paris <eparis@xxxxxxxxxx>
> > Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
>
> Although mine was a linux-next kernel and it doesn't appear that I have
> rcu_dereference_protected() at all, so I dropped that bit of the patch,
> it worked great! I got 4 more complaints to harass people with. Feel
> free to add my tested by if you care to.
>
> Tested-by: Eric Paris <eparis@xxxxxxxxxx>

Very nice!!! Queued for urgent, thank you Lai and Eric!!!

Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/