]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: lock crc access in bridge loop avoidance
authorSimon Wunderlich <sw@simonwunderlich.de>
Fri, 11 Sep 2015 16:04:13 +0000 (18:04 +0200)
committerAntonio Quartulli <a@unstable.cc>
Wed, 16 Dec 2015 07:17:09 +0000 (15:17 +0800)
commitaaaed4db04f3e0bb9845b60066150b4bd4153edb
tree60e9944e19fe8b52ef0e63667eb8af7cb7b85662
parent990455cee69fbb89f7d4db19ffad4e411f286cea
batman-adv: lock crc access in bridge loop avoidance

We have found some networks in which nodes were constantly requesting
other nodes BLA claim tables to synchronize, just to ask for that again
once completed. The reason was that the crc checksum of the asked nodes
were out of sync due to missing locking and multiple writes to the same
crc checksum when adding/removing entries. Therefore the asked nodes
constantly reported the wrong crc, which caused repeating requests.

To avoid multiple functions changing a backbone gateways crc entry at
the same time, lock it using a spinlock.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Tested-by: Alfons Name <AlfonsName@web.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/types.h