linux/net/batman-adv
Sven Eckelmann a33d970d0b batman-adv: Fix reference counting of vlan object for tt_local_entry
The batadv_tt_local_entry was specific to a batadv_softif_vlan and held an
implicit reference to it. But this reference was never stored in form of a
pointer in the tt_local_entry itself. Instead batadv_tt_local_remove,
batadv_tt_local_table_free and batadv_tt_local_purge_pending_clients depend
on a consistent state of bat_priv->softif_vlan_list and that
batadv_softif_vlan_get always returns the batadv_softif_vlan object which
it has a reference for. But batadv_softif_vlan_get cannot guarantee that
because it is working only with rcu_read_lock on this list. It can
therefore happen that an vid is in this list twice or that
batadv_softif_vlan_get cannot find the batadv_softif_vlan for an vid due to
some other list operations taking place at the same time.

Instead add a batadv_softif_vlan pointer directly in batadv_tt_local_entry
which will be used for the reference counter decremented on release of
batadv_tt_local_entry.

Fixes: 35df3b298f ("batman-adv: fix TT VLAN inconsistency on VLAN re-add")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
2016-04-29 19:46:11 +08:00
..
bat_algo.h batman-adv: OGMv2 - add basic infrastructure 2016-02-29 16:05:31 +08:00
bat_iv_ogm.c batman-adv: keep track of when unicast packets are sent 2016-02-29 16:05:32 +08:00
bat_v.c batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event 2016-04-29 19:46:11 +08:00
bat_v_elp.c batman-adv: ELP - send unicast ELP packets for throughput sampling 2016-02-29 16:25:07 +08:00
bat_v_elp.h batman-adv: ELP - compute the metric based on the estimated throughput 2016-02-29 16:25:06 +08:00
bat_v_ogm.c batman-adv: ELP - compute the metric based on the estimated throughput 2016-02-29 16:25:06 +08:00
bat_v_ogm.h batman-adv: OGMv2 - implement originators logic 2016-02-29 16:05:31 +08:00
bitarray.c batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
bitarray.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
bridge_loop_avoidance.c batman-adv: Rename batadv_claim *_free_ref function to *_put 2016-02-23 13:48:27 +08:00
bridge_loop_avoidance.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
debugfs.c batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
debugfs.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
distributed-arp-table.c batman-adv: fix DAT candidate selection (must use vid) 2016-04-29 19:46:10 +08:00
distributed-arp-table.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
fragmentation.c batman-adv: keep track of when unicast packets are sent 2016-02-29 16:05:32 +08:00
fragmentation.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
gateway_client.c batman-adv: Rename batadv_gw_node *_free_ref function to *_put 2016-02-23 13:49:06 +08:00
gateway_client.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
gateway_common.c batman-adv: add throughput override attribute to hard_ifaces 2016-02-29 16:05:32 +08:00
gateway_common.h batman-adv: add throughput override attribute to hard_ifaces 2016-02-29 16:05:32 +08:00
hard-interface.c batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event 2016-04-29 19:46:11 +08:00
hard-interface.h batman-adv: Rename batadv_hardif *_free_ref function to *_put 2016-02-23 13:48:24 +08:00
hash.c batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
hash.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
icmp_socket.c batman-adv: keep track of when unicast packets are sent 2016-02-29 16:05:32 +08:00
icmp_socket.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
Kconfig batman-adv: clarify CFG80211 dependency 2016-03-02 13:45:47 -05:00
main.c batman-adv: OGMv2 - add basic infrastructure 2016-02-29 16:05:31 +08:00
main.h batman-adv: Start new development cycle 2016-02-29 16:25:08 +08:00
Makefile batman-adv: OGMv2 - add basic infrastructure 2016-02-29 16:05:31 +08:00
multicast.c batman-adv: Convert batadv_orig_node to kref 2016-02-10 23:24:06 +08:00
multicast.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
network-coding.c batman-adv: keep track of when unicast packets are sent 2016-02-29 16:05:32 +08:00
network-coding.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
originator.c batman-adv: init neigh node last seen field 2016-04-24 15:39:19 +08:00
originator.h batman-adv: Rename batadv_orig_node_vlan *_free_ref function to *_put 2016-02-23 13:50:58 +08:00
packet.h batman-adv: OGMv2 - add basic infrastructure 2016-02-29 16:05:31 +08:00
routing.c batman-adv: Reduce refcnt of removed router when updating route 2016-04-24 15:41:25 +08:00
routing.h batman-adv: add seqno maximum age and protection start flag parameters 2016-02-10 23:23:57 +08:00
send.c batman-adv: Fix broadcast/ogm queue limit on a removed interface 2016-04-24 15:41:56 +08:00
send.h batman-adv: keep track of when unicast packets are sent 2016-02-29 16:05:32 +08:00
soft-interface.c batman-adv: Check skb size before using encapsulated ETH+VLAN header 2016-04-24 15:37:21 +08:00
soft-interface.h batman-adv: Rename batadv_softif_vlan *_free_ref function to *_put 2016-02-23 13:49:10 +08:00
sysfs.c batman-adv: add throughput override attribute to hard_ifaces 2016-02-29 16:05:32 +08:00
sysfs.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
translation-table.c batman-adv: Fix reference counting of vlan object for tt_local_entry 2016-04-29 19:46:11 +08:00
translation-table.h batman-adv: update copyright years for 2016 2016-02-02 12:55:10 +08:00
types.h batman-adv: Fix reference counting of vlan object for tt_local_entry 2016-04-29 19:46:11 +08:00