* [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path
@ 2004-10-19 22:02 Patrick McHardy
2004-10-21 5:16 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2004-10-19 22:02 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
ndisc_dst_alloc leaks a inet6_dev reference when ip6_dst_alloc
returns NULL. The bug was introduced somewhere between 2.6.8
and 2.6.9.
Regards
Patrick
[-- Attachment #2: p1 --]
[-- Type: text/plain, Size: 797 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/10/19 23:13:24+02:00 kaber@coreworks.de
# [IPV6]: Fix inet6_dev reference leak in ndisc_dst_alloc error path
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv6/route.c
# 2004/10/19 23:12:48+02:00 kaber@coreworks.de +3 -1
# [IPV6]: Fix inet6_dev reference leak in ndisc_dst_alloc error path
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c
--- a/net/ipv6/route.c 2004-10-19 23:51:11 +02:00
+++ b/net/ipv6/route.c 2004-10-19 23:51:11 +02:00
@@ -647,8 +647,10 @@
return NULL;
rt = ip6_dst_alloc();
- if (unlikely(rt == NULL))
+ if (unlikely(rt == NULL)) {
+ in6_dev_put(idev);
goto out;
+ }
dev_hold(dev);
if (neigh)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path
2004-10-19 22:02 [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path Patrick McHardy
@ 2004-10-21 5:16 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-10-21 5:16 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netdev
On Wed, 20 Oct 2004 00:02:31 +0200
Patrick McHardy <kaber@trash.net> wrote:
> ndisc_dst_alloc leaks a inet6_dev reference when ip6_dst_alloc
> returns NULL. The bug was introduced somewhere between 2.6.8
> and 2.6.9.
Applied, thanks Patrick.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-21 5:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-19 22:02 [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path Patrick McHardy
2004-10-21 5:16 ` David S. 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).