From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path
Date: Wed, 20 Oct 2004 00:02:31 +0200 [thread overview]
Message-ID: <41758EF7.6010906@trash.net> (raw)
[-- 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)
next reply other threads:[~2004-10-19 22:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-19 22:02 Patrick McHardy [this message]
2004-10-21 5:16 ` [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41758EF7.6010906@trash.net \
--to=kaber@trash.net \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).