* [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
@ 2012-01-13 8:33 roy.qing.li
2012-01-13 9:48 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: roy.qing.li @ 2012-01-13 8:33 UTC (permalink / raw)
To: netdev
From: RongQing.Li <roy.qing.li@gmail.com>
release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
net/ipv6/route.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 07361df..8c2e3ab 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
else {
neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
if (IS_ERR(neigh)) {
+ in6_dev_put(idev);
dst_free(&rt->dst);
return ERR_CAST(neigh);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
2012-01-13 8:33 [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc roy.qing.li
@ 2012-01-13 9:48 ` Eric Dumazet
2012-01-13 18:11 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-01-13 9:48 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
Le vendredi 13 janvier 2012 à 16:33 +0800, roy.qing.li@gmail.com a
écrit :
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
>
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
> ---
> net/ipv6/route.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 07361df..8c2e3ab 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
> else {
> neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
> if (IS_ERR(neigh)) {
> + in6_dev_put(idev);
> dst_free(&rt->dst);
> return ERR_CAST(neigh);
> }
Good catch, thanks.
Bug added in commit b43faac6906 (ipv6: If neigh lookup fails during
icmp6 dst allocation, propagate error.),
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
2012-01-13 9:48 ` Eric Dumazet
@ 2012-01-13 18:11 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-01-13 18:11 UTC (permalink / raw)
To: eric.dumazet; +Cc: roy.qing.li, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 13 Jan 2012 10:48:41 +0100
> Le vendredi 13 janvier 2012 à 16:33 +0800, roy.qing.li@gmail.com a
> écrit :
>> From: RongQing.Li <roy.qing.li@gmail.com>
>>
>> release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
>>
>> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
>> ---
>> net/ipv6/route.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index 07361df..8c2e3ab 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
>> else {
>> neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
>> if (IS_ERR(neigh)) {
>> + in6_dev_put(idev);
>> dst_free(&rt->dst);
>> return ERR_CAST(neigh);
>> }
>
> Good catch, thanks.
>
> Bug added in commit b43faac6906 (ipv6: If neigh lookup fails during
> icmp6 dst allocation, propagate error.),
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-13 18:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 8:33 [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc roy.qing.li
2012-01-13 9:48 ` Eric Dumazet
2012-01-13 18:11 ` 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).