mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
9d31b3ce81
This patch fixes a potential memory leak which can occur once an originator times out. On timeout the according global translation table entry might not get purged correctly. Furthermore, the non purged TT entry will cause its orig-node to leak, too. Which additionally can lead to the new multicast optimization feature not kicking in because of a therefore bogus counter. In detail: The batadv_tt_global_entry->orig_list holds the reference to the orig-node. Usually this reference is released after BATADV_PURGE_TIMEOUT through: _batadv_purge_orig()-> batadv_purge_orig_node()->batadv_update_route()->_batadv_update_route()-> batadv_tt_global_del_orig() which purges this global tt entry and releases the reference to the orig-node. However, if between two batadv_purge_orig_node() calls the orig-node timeout grew to 2*BATADV_PURGE_TIMEOUT then this call path isn't reached. Instead the according orig-node is removed from the originator hash in _batadv_purge_orig(), the batadv_update_route() part is skipped and won't be reached anymore. Fixing the issue by moving batadv_tt_global_del_orig() out of the rcu callback. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Acked-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> |
||
---|---|---|
.. | ||
bat_algo.h | ||
bat_iv_ogm.c | ||
bitarray.c | ||
bitarray.h | ||
bridge_loop_avoidance.c | ||
bridge_loop_avoidance.h | ||
debugfs.c | ||
debugfs.h | ||
distributed-arp-table.c | ||
distributed-arp-table.h | ||
fragmentation.c | ||
fragmentation.h | ||
gateway_client.c | ||
gateway_client.h | ||
gateway_common.c | ||
gateway_common.h | ||
hard-interface.c | ||
hard-interface.h | ||
hash.c | ||
hash.h | ||
icmp_socket.c | ||
icmp_socket.h | ||
Kconfig | ||
main.c | ||
main.h | ||
Makefile | ||
multicast.c | ||
multicast.h | ||
network-coding.c | ||
network-coding.h | ||
originator.c | ||
originator.h | ||
packet.h | ||
routing.c | ||
routing.h | ||
send.c | ||
send.h | ||
soft-interface.c | ||
soft-interface.h | ||
sysfs.c | ||
sysfs.h | ||
translation-table.c | ||
translation-table.h | ||
types.h |