* [PATCH] llc: free the right skb
@ 2012-08-06 12:35 Sorin Dumitru
2012-08-06 20:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sorin Dumitru @ 2012-08-06 12:35 UTC (permalink / raw)
To: netdev; +Cc: acme, davem, Sorin Dumitru
We are freeing skb instead of nskb, resulting in a double
free on skb and a leak from nskb.
Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>
---
net/llc/llc_station.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index 39a8d89..6828e39 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -268,7 +268,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
out:
return rc;
free:
- kfree_skb(skb);
+ kfree_skb(nskb);
goto out;
}
@@ -293,7 +293,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
out:
return rc;
free:
- kfree_skb(skb);
+ kfree_skb(nskb);
goto out;
}
@@ -322,7 +322,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
out:
return rc;
free:
- kfree_skb(skb);
+ kfree_skb(nskb);
goto out;
}
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] llc: free the right skb
2012-08-06 12:35 [PATCH] llc: free the right skb Sorin Dumitru
@ 2012-08-06 20:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-06 20:31 UTC (permalink / raw)
To: sdumitru; +Cc: netdev, acme
From: Sorin Dumitru <sdumitru@ixiacom.com>
Date: Mon, 6 Aug 2012 15:35:58 +0300
> We are freeing skb instead of nskb, resulting in a double
> free on skb and a leak from nskb.
>
> Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-06 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-06 12:35 [PATCH] llc: free the right skb Sorin Dumitru
2012-08-06 20:31 ` David Miller
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).