b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object
@ 2016-06-02 23:00 Ben Hutchings
  2016-06-03  0:06 ` Sven Eckelmann
  2016-06-03  9:05 ` Sven Eckelmann
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Hutchings @ 2016-06-02 23:00 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

Commit a33d970d0b54 "batman-adv: Fix reference counting of vlan object
for tt_local_entry") makes 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 ...")
Cc: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
This is untested; I just spotted this apparent oversight while trying
to backport the previous fix.

Ben.

 net/batman-adv/translation-table.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index feaf492b01ca..2068cf6648cb 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -691,7 +691,6 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 	if (unlikely(hash_added != 0)) {
 		/* remove the reference for the hash */
 		batadv_tt_local_entry_put(tt_local);
-		batadv_softif_vlan_put(vlan);
 		goto out;
 	}
 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object
  2016-06-02 23:00 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object Ben Hutchings
@ 2016-06-03  0:06 ` Sven Eckelmann
  2016-06-06 15:31   ` Marek Lindner
  2016-06-03  9:05 ` Sven Eckelmann
  1 sibling, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-06-03  0:06 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

On Friday 03 June 2016 00:00:44 Ben Hutchings wrote:
> Commit a33d970d0b54 "batman-adv: Fix reference counting of vlan object
> for tt_local_entry") makes 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
> ...") Cc: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> This is untested; I just spotted this apparent oversight while trying
> to backport the previous fix.

Yes, you are completely right. I've missed this line in the error handling 
path for hash_add in batadv_tt_local_add

Acked-by: Sven Eckelmann <sven@narfation.org>

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object
  2016-06-02 23:00 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object Ben Hutchings
  2016-06-03  0:06 ` Sven Eckelmann
@ 2016-06-03  9:05 ` Sven Eckelmann
  1 sibling, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2016-06-03  9:05 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

On Friday 03 June 2016 00:00:44 Ben Hutchings wrote:
> Fixes: a33d970d0b54 ("batman-adv: Fix reference counting of vlan object ...")

Btw the Fixes for the batman-adv.git is:

Fixes: 20ca393adddf ("batman-adv: Fix reference counting of vlan object for tt_local_entry")

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object
  2016-06-03  0:06 ` Sven Eckelmann
@ 2016-06-06 15:31   ` Marek Lindner
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2016-06-06 15:31 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Ben Hutchings

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

On Friday, June 03, 2016 02:06:10 Sven Eckelmann wrote:
> On Friday 03 June 2016 00:00:44 Ben Hutchings wrote:
> > Commit a33d970d0b54 "batman-adv: Fix reference counting of vlan object
> > for tt_local_entry") makes 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
> > ...") Cc: Sven Eckelmann <sven@narfation.org>
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > This is untested; I just spotted this apparent oversight while trying
> > to backport the previous fix.
> 
> Yes, you are completely right. I've missed this line in the error handling
> path for hash_add in batadv_tt_local_add
> 
> Acked-by: Sven Eckelmann <sven@narfation.org>

Applied in revision 22bb8b8.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-06 15:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 23:00 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object Ben Hutchings
2016-06-03  0:06 ` Sven Eckelmann
2016-06-06 15:31   ` Marek Lindner
2016-06-03  9:05 ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).