]> 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)
commitea8c0df13c84b6f6c7cef89f0cb7a4c20da0db61
treef1ae84324fe9990fa8b04edd17384e644d8cb73b
parenta028cca229c484c0955a050cd0b0e1db7cb68cd1
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