]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq
authorSven Eckelmann <sven@narfation.org>
Sun, 3 Dec 2017 10:26:45 +0000 (11:26 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Mon, 4 Dec 2017 10:47:33 +0000 (11:47 +0100)
commit98e789b26fafe8954ef4a84a19686633935a2f83
tree2a929d165e8dd125005198c17cf9203cb3baffa7
parent1cc7ab9c5ea97ffb8d526b60bf87dd85067ee24d
batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq

The originator node object orig_neigh_node is used to when accessing the
bcast_own(_sum) and real_packet_count information. The access to them has
to be protected with the spinlock in orig_neigh_node.

But the function uses the lock in orig_node instead. This is incorrect
because they could be two different originator node objects.

Fixes: 7088e747f361 ("batman-adv: protect bit operations to count OGMs with spinlock")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c