On Sunday, January 31, 2016 13:27:59 Sven Eckelmann wrote:
The batadv_gw_node reference counter in batadv_gw_node_update can only be reduced when the list entry was actually removed. Otherwise the reference counter may reach zero when batadv_gw_node_update is called from two different contexts for the same gw_node but only one context is actually removing the entry from the list.
The release function for this gw_node is not called inside the list_lock spinlock protected region because the function batadv_gw_node_update still holds a gw_node 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: 0511575c4d03 ("batman-adv: remove obsolete deleted attribute for gateway node") Signed-off-by: Sven Eckelmann sven@narfation.org
net/batman-adv/gateway_client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Applied in revision c215e4e.
Thanks, Marek