From patchwork Sun Jun 26 09:16:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16395 Return-Path: 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 A627D81DFB; Sun, 26 Jun 2016 11:16:46 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=wXN89BSA; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 0CF53817A8 for ; Sun, 26 Jun 2016 11:16:29 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593D02DF90000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93d0:2df9::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 8AC461C8001; Sun, 26 Jun 2016 11:16:29 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1466932589; bh=x+UtouYORI0rCi8X5Zsw/qbSnWiI7Duox4MiZeHKYWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wXN89BSAXDPBz9SjlnXi7jzh8dFZYDn6iosmnD6TMar0ypddG4AKK45/ZIIU+oAxX fStCdR+3/nJUx5n3/y6i0ytx9+iuun+aKtN1see4khdybhCUvPGAZvXCC2Oo6q7Klv uMaFVfaOX5FmNBNrnCHMGZINZFXjehs5QU9n7Kps= From: Sven Eckelmann To: David Miller Date: Sun, 26 Jun 2016 11:16:11 +0200 Message-Id: <1466932573-23105-3-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <10049349.EHEiaYmtBd@sven-edge> References: <10049349.EHEiaYmtBd@sven-edge> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Ben Hutchings , Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH net 3/5] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" From: Ben Hutchings 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 --- 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 cfb5ccd..57ec87f 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -693,7 +693,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; }