summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2016-06-26 11:16:11 +0200
committerBen Hutchings <ben@decadent.org.uk>2016-08-22 22:38:24 +0100
commit51e37ea199daca63f7d8cdde65985d65971e77b8 (patch)
treedd3c0f2e531274d80d7fb444e31f3ca832a2e1c3 /net/batman-adv/translation-table.c
parent556407758052a9b23faa0bd7ecd047e9fcdd61c8 (diff)
downloadlinux-stable-51e37ea199daca63f7d8cdde65985d65971e77b8.tar.gz
linux-stable-51e37ea199daca63f7d8cdde65985d65971e77b8.tar.bz2
linux-stable-51e37ea199daca63f7d8cdde65985d65971e77b8.zip
batman-adv: Fix double-put of vlan object
commit baceced93274ff2f846eae991664f9094425ffa8 upstream. Each batadv_tt_local_entry hold a single reference to a batadv_softif_vlan. In case a new entry cannot be added to the hash table, the error path puts the reference, but the reference will also now be dropped by batadv_tt_local_entry_release(). Fixes: a33d970d0b54 ("batman-adv: Fix reference counting of vlan object for tt_local_entry") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 3.16: s/_put/_free_ref/]
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index d6560b68692a..7da3f84fff2f 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -618,7 +618,6 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
if (unlikely(hash_added != 0)) {
/* remove the reference for the hash */
batadv_tt_local_entry_free_ref(tt_local);
- batadv_softif_vlan_free_ref(vlan);
goto out;
}