* [PATCH net] vxlan: release rt when found circular route
@ 2013-12-05 8:03 Fan Du
2013-12-05 12:22 ` Eric Dumazet
2013-12-06 20:14 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Fan Du @ 2013-12-05 8:03 UTC (permalink / raw)
To: davem; +Cc: netdev
Otherwise causing dst memory leakage.
Have Checked all other type tunnel device transmit implementation,
no such things happens anymore.
Signed-off-by: Fan Du <fan.du@windriver.com>
---
drivers/net/vxlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 78df8f3..97b4340 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1665,6 +1665,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
}
if (rt->dst.dev == dev) {
+ ip_rt_put(rt);
netdev_dbg(dev, "circular route to %pI4\n",
&dst->sin.sin_addr.s_addr);
dev->stats.collisions++;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] vxlan: release rt when found circular route
2013-12-05 8:03 [PATCH net] vxlan: release rt when found circular route Fan Du
@ 2013-12-05 12:22 ` Eric Dumazet
2013-12-06 20:14 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2013-12-05 12:22 UTC (permalink / raw)
To: Fan Du; +Cc: davem, netdev
On Thu, 2013-12-05 at 16:03 +0800, Fan Du wrote:
> Otherwise causing dst memory leakage.
> Have Checked all other type tunnel device transmit implementation,
> no such things happens anymore.
>
> Signed-off-by: Fan Du <fan.du@windriver.com>
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] vxlan: release rt when found circular route
2013-12-05 8:03 [PATCH net] vxlan: release rt when found circular route Fan Du
2013-12-05 12:22 ` Eric Dumazet
@ 2013-12-06 20:14 ` David Miller
2013-12-09 6:27 ` [PATCHv2 " Fan Du
1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2013-12-06 20:14 UTC (permalink / raw)
To: fan.du; +Cc: netdev
From: Fan Du <fan.du@windriver.com>
Date: Thu, 5 Dec 2013 16:03:51 +0800
> Otherwise causing dst memory leakage.
> Have Checked all other type tunnel device transmit implementation,
> no such things happens anymore.
>
> Signed-off-by: Fan Du <fan.du@windriver.com>
...
> @@ -1665,6 +1665,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> }
>
> if (rt->dst.dev == dev) {
> + ip_rt_put(rt);
> netdev_dbg(dev, "circular route to %pI4\n",
> &dst->sin.sin_addr.s_addr);
> dev->stats.collisions++;
There is already a "rt_tx_error" label that will handle releasing the
'rt', so at the end of this basic block, goto rt_tx_error instead of
just plain tx_error.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCHv2 net] vxlan: release rt when found circular route
2013-12-06 20:14 ` David Miller
@ 2013-12-09 6:27 ` Fan Du
2013-12-11 3:02 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Fan Du @ 2013-12-09 6:27 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Eric Dumazet
On 2013年12月07日 04:14, David Miller wrote:
> From: Fan Du<fan.du@windriver.com>
> Date: Thu, 5 Dec 2013 16:03:51 +0800
>
>> Otherwise causing dst memory leakage.
>> Have Checked all other type tunnel device transmit implementation,
>> no such things happens anymore.
>>
>> Signed-off-by: Fan Du<fan.du@windriver.com>
> ...
>> @@ -1665,6 +1665,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>> }
>>
>> if (rt->dst.dev == dev) {
>> + ip_rt_put(rt);
>> netdev_dbg(dev, "circular route to %pI4\n",
>> &dst->sin.sin_addr.s_addr);
>> dev->stats.collisions++;
>
> There is already a "rt_tx_error" label that will handle releasing the
> 'rt', so at the end of this basic block, goto rt_tx_error instead of
> just plain tx_error.
My first thought is using rt_tx_error indeed :), but second thought is
this might criticized by being ugly. Anyway please review.
From 8867cb9783511a1c945a087209484f74de912689 Mon Sep 17 00:00:00 2001
From: Fan Du <fan.du@windriver.com>
Date: Mon, 9 Dec 2013 10:33:53 +0800
Subject: [PATCHv2 net] vxlan: release rt when found circular route
Otherwise causing dst memory leakage.
Have Checked all other type tunnel device transmit implementation,
no such things happens anymore.
Signed-off-by: Fan Du <fan.du@windriver.com>
Acked-by: Eric Dumazet <edumazet@google.com>
---
v2: use rt_tx_error label to release rt.
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0358c07..249e01c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1668,7 +1668,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
netdev_dbg(dev, "circular route to %pI4\n",
&dst->sin.sin_addr.s_addr);
dev->stats.collisions++;
- goto tx_error;
+ goto rt_tx_error;
}
/* Bypass encapsulation if the destination is local */
--
1.7.9.5
--
浮沉随浪只记今朝笑
--fan
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv2 net] vxlan: release rt when found circular route
2013-12-09 6:27 ` [PATCHv2 " Fan Du
@ 2013-12-11 3:02 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-12-11 3:02 UTC (permalink / raw)
To: fan.du; +Cc: netdev, eric.dumazet
From: Fan Du <fan.du@windriver.com>
Date: Mon, 9 Dec 2013 14:27:55 +0800
> From: Fan Du <fan.du@windriver.com>
> Date: Mon, 9 Dec 2013 10:33:53 +0800
> Subject: [PATCHv2 net] vxlan: release rt when found circular route
>
> Otherwise causing dst memory leakage.
> Have Checked all other type tunnel device transmit implementation,
> no such things happens anymore.
>
> Signed-off-by: Fan Du <fan.du@windriver.com>
> Acked-by: Eric Dumazet <edumazet@google.com>
> ---
> v2: use rt_tx_error label to release rt.
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-11 3:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 8:03 [PATCH net] vxlan: release rt when found circular route Fan Du
2013-12-05 12:22 ` Eric Dumazet
2013-12-06 20:14 ` David Miller
2013-12-09 6:27 ` [PATCHv2 " Fan Du
2013-12-11 3:02 ` 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).