From: Ben Hutchings Date: Sun, 26 Jun 2016 09:16:11 +0000 (+0200) Subject: batman-adv: Fix double-put of vlan object X-Git-Tag: v3.16.37~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51e37ea199daca63f7d8cdde65985d65971e77b8;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: David S. Miller [bwh: Backported to 3.16: s/_put/_free_ref/] --- diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index d6560b68692a5..7da3f84fff2fd 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; }