[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: [PATCH] fix dst_entry leak in icmp_push_reply()
From: Ollie Wild <aaw () rincewind ! tv>
Date: 2005-08-17 20:21:19
Message-ID: 43039C3F.2000207 () rincewind ! tv
[Download RAW message or body]
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
["icmp_push_reply.patch" (text/x-patch)]
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);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic