summaryrefslogtreecommitdiff
path: root/crypto/ansi_cprng.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2018-08-12 21:04:41 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2018-09-06 13:55:20 +0200
commitdff9bc42ab0b2d38c5e90ddd79b238fed5b4c7ad (patch)
treeedb50bc7ab394d558b537397645dc7600c21e473 /crypto/ansi_cprng.c
parenta25bab9d723a08bd0bdafb1529faf9094c690b70 (diff)
batman-adv: Prevent duplicated gateway_node entry
The function batadv_gw_node_add is responsible for adding new gw_node to the gateway_list. It is expecting that the caller already checked that there is not already an entry with the same key or not. But the lock for the list is only held when the list is really modified. This could lead to duplicated entries because another context could create an entry with the same key between the check and the list manipulation. The check and the manipulation of the list must therefore be in the same locked code section. Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Sven Eckelmann <sven@narfation.org> Acked-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'crypto/ansi_cprng.c')
0 files changed, 0 insertions, 0 deletions