From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH 2.6 5/7]: Fix ipip_fb_tunnel_dev leak in ipip_fini
Date: Sun, 03 Oct 2004 23:13:19 +0200 [thread overview]
Message-ID: <41606B6F.5040204@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
ipip_fb_tunnel_dev doesn't have a destructor set
and is not freed manually. Set the destructor in
ipip_tunnel_setup to fix the leak.
[-- Attachment #2: 05.diff --]
[-- Type: text/x-patch, Size: 1029 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/10/03 20:42:17+02:00 kaber@coreworks.de
# [IPV4]: Fix ipip_fb_tunnel_dev leak in ipip_fini
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv4/ipip.c
# 2004/10/03 20:41:38+02:00 kaber@coreworks.de +1 -1
# [IPV4]: Fix ipip_fb_tunnel_dev leak in ipip_fini
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c
--- a/net/ipv4/ipip.c 2004-10-03 22:20:49 +02:00
+++ b/net/ipv4/ipip.c 2004-10-03 22:20:49 +02:00
@@ -246,7 +246,6 @@
nt = dev->priv;
SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init;
- dev->destructor = free_netdev;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
@@ -784,6 +783,7 @@
dev->get_stats = ipip_tunnel_get_stats;
dev->do_ioctl = ipip_tunnel_ioctl;
dev->change_mtu = ipip_tunnel_change_mtu;
+ dev->destructor = free_netdev;
dev->type = ARPHRD_TUNNEL;
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
reply other threads:[~2004-10-03 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41606B6F.5040204@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).