From patchwork Sat Sep 4 22:25:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 386 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.net (Postfix) with SMTP id 0D20315430B for ; Sun, 5 Sep 2010 00:24:55 +0200 (CEST) Received: (qmail invoked by alias); 04 Sep 2010 22:24:54 -0000 Received: from i59F6A2A6.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [89.246.162.166] by mail.gmx.net (mp005) with SMTP; 05 Sep 2010 00:24:54 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX18kC1ZiDakkD/1/qrT7hTLXymOvYxn2QhvEC2J5gf SRbFfVzsmsJ0dh From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 5 Sep 2010 00:25:00 +0200 Message-Id: <1283639100-6506-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Don't free unicast skb on failure X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 22:24:55 -0000 The soft-interface transmission function expects that the unicast skb is still available when a send failed. Otherwise we would try to free the skb twice and create many different and hard to debug memory access failures due to access on not (anymore) allocated memory. Reported-by: Andreas Langer Signed-off-by: Sven Eckelmann --- unicast.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/unicast.c b/unicast.c index 84b204b..796d9c1 100644 --- a/unicast.c +++ b/unicast.c @@ -264,6 +264,5 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) unlock: spin_unlock_irqrestore(&bat_priv->orig_hash_lock, flags); dropped: - kfree_skb(skb); return 1; }