* [PATCH] ip_tunnel: fix possible rtable leak
@ 2014-06-06 0:34 Dmitry Popov
2014-06-06 1:46 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Popov @ 2014-06-06 0:34 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy
Cc: netdev, linux-kernel, trivial
ip_rt_put(rt) is always called in "error" branches above, but was missed in
skb_cow_head branch. As rt is not yet bound to skb here we have to release it by
hand.
Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
---
net/ipv4/ip_tunnel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 2acc233..3f6135b 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -668,6 +668,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
dev->needed_headroom = max_headroom;
if (skb_cow_head(skb, dev->needed_headroom)) {
+ ip_rt_put(rt);
dev->stats.tx_dropped++;
kfree_skb(skb);
return;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ip_tunnel: fix possible rtable leak
2014-06-06 0:34 [PATCH] ip_tunnel: fix possible rtable leak Dmitry Popov
@ 2014-06-06 1:46 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-06 1:46 UTC (permalink / raw)
To: ixaphire; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel, trivial
From: Dmitry Popov <ixaphire@qrator.net>
Date: Fri, 6 Jun 2014 04:34:37 +0400
> ip_rt_put(rt) is always called in "error" branches above, but was missed in
> skb_cow_head branch. As rt is not yet bound to skb here we have to release it by
> hand.
>
> Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-06 1:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 0:34 [PATCH] ip_tunnel: fix possible rtable leak Dmitry Popov
2014-06-06 1:46 ` 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).