Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix locking in hash_add()

Marek Lindner
2012-05-11T19:50:20Z

On Wednesday, May 09, 2012 04:38:58 Sven Eckelmann wrote:
> Details
>
> On Tuesday 08 May 2012 22:31:57 Matthias Schiffer wrote:
> > To ensure an entry isn't added twice all comparisons have to be protected
> > by the hash line write spinlock. This doesn't really hurt as the case
> > that it is tried to add an element already present to the hash shouldn't
> > occur very often, so in most cases the lock would have have to be taken
> > anyways.
> >
> >
> >[..]
> >
> > -err_unlock:
> > - rcu_read_unlock();
> > +unlock:
> > + spin_unlock_bh(list_lock);
> >
> > out:
> > return ret;
> > }
>
> Acked-by: Sven Eckelmann <sven@narfation.org>

Applied in revision 41c5874.

Thanks,
Marek