Re: [PATCH] rcu: Use wrapper for lockdep asserts

From: Matthew Wilcox
Date: Wed Jan 17 2018 - 19:42:05 EST


On Wed, Jan 17, 2018 at 03:29:13PM -0800, Paul E. McKenney wrote:
> On Wed, Jan 17, 2018 at 06:24:30AM -0800, Matthew Wilcox wrote:
> >
> > From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> >
> > Commits c0b334c5bfa9 and ea9b0c8a26a2 introduced new sparse warnings
> > by accessing rcu_node->lock directly and ignoring the __private
> > marker. Introduce a new wrapper and use it. Also fix a similar problem
> > in srcutree.c introduced by a3883df3935e.
> >
> > Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
>
> Good catch! Applied for review and testing.
>
> For some reason, I was expecting 0day to catch this sort of thing...

Funny you should say, it was 0day which pointed it out to me! I changed
lockdep to take a const struct lockdep_map *lock instead of a plain
struct lockdep_map *lock and I got a whinge from 0day that I'd changed
some of the warnings, so I looked into it in case it was my fault.