diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-01-31 13:28:00 +0100 |
---|---|---|
committer | Antonio Quartulli <a@unstable.cc> | 2016-02-16 10:52:26 +0100 |
commit | 3db152093efb750bc47fd4d69355b90b18113105 (patch) | |
tree | 2c4040232edddcee0aa51d02e6d88de289d2adb8 /net/decnet/dn_route.c | |
parent | batman-adv: Only put gw_node list reference when removed (diff) | |
download | linux-3db152093efb750bc47fd4d69355b90b18113105.tar.xz linux-3db152093efb750bc47fd4d69355b90b18113105.zip |
batman-adv: Only put orig_node_vlan list reference when removed
The batadv_orig_node_vlan reference counter in batadv_tt_global_size_mod
can only be reduced when the list entry was actually removed. Otherwise the
reference counter may reach zero when batadv_tt_global_size_mod is called
from two different contexts for the same orig_node_vlan but only one
context is actually removing the entry from the list.
The release function for this orig_node_vlan is not called inside the
vlan_list_lock spinlock protected region because the function
batadv_tt_global_size_mod still holds a orig_node_vlan reference for the
object pointer on the stack. Thus the actual release function (when
required) will be called only at the end of the function.
Fixes: 7ea7b4a14275 ("batman-adv: make the TT CRC logic VLAN specific")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net/decnet/dn_route.c')
0 files changed, 0 insertions, 0 deletions