[lkml]   [2005]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] fix dst_entry leak in icmp_push_reply()
    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
    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;
    + } else {
    + ip_flush_pending_frames(icmp_socket->sk);
     \ /
      Last update: 2005-08-17 22:23    [W:0.035 / U:81.388 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site