From: Ollie Wild <aaw@rincewind.tv>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] fix dst_entry leak in icmp_push_reply()
Date: Wed, 17 Aug 2005 13:21:19 -0700 [thread overview]
Message-ID: <43039C3F.2000207@rincewind.tv> (raw)
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
If the ip_append_data() call in icmp_push_reply() fails,
ip_flush_pending_frames() needs to be called. Otherwise, ip_rt_put() is
never called on inet_sk(icmp_socket->sk)->cork.rt, which prevents the
route (and net_device) from ever being freed.
I've attached a patch which fixes the problem.
Ollie Wild
[-- Attachment #2: icmp_push_reply.patch --]
[-- Type: text/x-patch, Size: 334 bytes --]
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -368,6 +368,8 @@ static void icmp_push_reply(struct icmp_
icmph->checksum = csum_fold(csum);
skb->ip_summed = CHECKSUM_NONE;
ip_push_pending_frames(icmp_socket->sk);
+ } else {
+ ip_flush_pending_frames(icmp_socket->sk);
}
}
next reply other threads:[~2005-08-17 20:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-17 20:21 Ollie Wild [this message]
2005-08-17 23:56 ` [PATCH] fix dst_entry leak in icmp_push_reply() Patrick McHardy
2005-08-18 6:41 ` Ollie Wild
2005-08-18 18:42 ` Patrick McHardy
2005-08-18 18:42 ` Patrick McHardy
2005-08-18 18:45 ` Ollie Wild
2005-08-18 18:59 ` Patrick McHardy
2005-08-18 18:59 ` Patrick McHardy
2005-08-18 19:05 ` Ollie Wild
2005-08-18 21:32 ` David S. Miller
2005-08-18 21:32 ` David S. Miller
2005-08-18 19:05 ` Ollie Wild
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=43039C3F.2000207@rincewind.tv \
--to=aaw@rincewind.tv \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.