Message ID | 20160602230044.GM7555@decadent.org.uk (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 22bb8b894900064d3fb09032a47577e89fc30d7c |
Delegated to: | Marek Lindner |
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id B87A281819; Fri, 3 Jun 2016 01:29:00 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=decadent.org.uk Received-SPF: None (no SPF record) identity=mailfrom; client-ip=88.96.1.126; helo=shadbolt.e.decadent.org.uk; envelope-from=ben@decadent.org.uk; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=decadent.org.uk X-Greylist: delayed 1691 seconds by postgrey-1.35 at open-mesh.org; Fri, 03 Jun 2016 01:28:57 CEST Received: from shadbolt.e.decadent.org.uk (shadbolt.e.decadent.org.uk [88.96.1.126]) by open-mesh.org (Postfix) with ESMTPS id 61FBF81772 for <b.a.t.m.a.n@lists.open-mesh.org>; Fri, 3 Jun 2016 01:28:57 +0200 (CEST) Received: from ben by shadbolt.decadent.org.uk with local (Exim 4.84_2) (envelope-from <ben@decadent.org.uk>) id 1b8bbY-0000d5-8O; Fri, 03 Jun 2016 00:00:44 +0100 Date: Fri, 3 Jun 2016 00:00:44 +0100 From: Ben Hutchings <ben@decadent.org.uk> To: b.a.t.m.a.n@lists.open-mesh.org Message-ID: <20160602230044.GM7555@decadent.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JWJEtCrVvH5hpatL" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: <locally generated> X-SA-Exim-Mail-From: ben@decadent.org.uk X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on shadbolt.decadent.org.uk X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=disabled version=3.4.0 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on shadbolt.decadent.org.uk) Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix double-put of vlan object X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Commit Message
Ben Hutchings
June 2, 2016, 11 p.m. UTC
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(-)
Comments
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
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
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
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; }