Re: [PATCH v3 1/1] rcu: uninline rcu_lock_acquire() and rcu_lock_release()

From: Oleg Nesterov
Date: Thu Jun 26 2014 - 15:45:24 EST


On 06/26, Paul E. McKenney wrote:
>
> On Thu, Jun 26, 2014 at 08:36:57PM +0200, Oleg Nesterov wrote:
>
> > > +static void rcu_release_map(struct lockdep_map *map, unsigned long ip)
> > > +{
> > > + rcu_lockdep_assert_watching();
> > > + __rcu_lock_release(&map, ip);
> >
> > "map", not "&map". I fixed this before I sent v2, but apparently forgot to
> > -add before --amend.
> >
> > Sorry for noise.
>
> Not a problem! Looks generally sane, but with a bit of adjustment
> still needed.
>
> I got some test failures on v2:
>
> o Build breakage if built with CONFIG_DEBUG_LOCK_ALLOC=n. I believe
> that the best way to fix this is to #ifdef out the bodies of
> __rcu_lock_acquire() and __rcu_lock_release(), but maybe you
> have something else in mind.

Damn ;) Will fix and send v4. Thanks.

> o Lockdep splat as follows, which might well be due to the
> "&map" that you noted above:

Yes, this should be hopefully fixed. Note that

> [ 0.000000] [ BUG: bad unlock balance detected! ]
> [ 0.000000] 3.16.0-rc1+ #1 Not tainted
> [ 0.000000] -------------------------------------
> [ 0.000000] swapper/0 is trying to release lock (X?à<81>ÿÿÿÿ<97>^Sò<81>ÿÿÿÿX?à<81>ÿÿÿÿ{±ò<81>@B^O) at:

prints garbage.

> And a few other things noted below.

Yes, will, do.

Thanks!

Oleg.

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