]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: fix locking in hash_add()
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 8 May 2012 20:31:57 +0000 (22:31 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Mon, 18 Jun 2012 16:01:06 +0000 (18:01 +0200)
commit036e6787a2d4ba4b3bbff48904dc4333bd901a6c
treef1ae84324fe9990fa8b04edd17384e644d8cb73b
parent0e90583fe48c7b4bc987682417d938a5a1ad2e7f
batman-adv: fix locking in hash_add()

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.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/hash.h