netdev
[Top] [All Lists]

Re: [PATCH] fix dst_entry leak in icmp_push_reply()

To: Ollie Wild <aaw@xxxxxxxxxxxx>
Subject: Re: [PATCH] fix dst_entry leak in icmp_push_reply()
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Thu, 18 Aug 2005 20:42:52 +0200
Cc: linux-kernel@xxxxxxxxxxxxxxx, Maillist netdev <netdev@xxxxxxxxxxx>
In-reply-to: <43042D94.4030303@rincewind.tv>
References: <43039C3F.2000207@rincewind.tv> <4303CEC5.3010502@trash.net> <43042D94.4030303@rincewind.tv>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.10) Gecko/20050803 Debian/1.7.10-1
Ollie Wild wrote:
> Patrick McHardy wrote:
> 
>> Ollie Wild wrote:
>>
>>> 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.
>>
>> Your patch doesn't fit your description, the else-condition you're
>> adding triggers when the queue is empty, so what is the point?
> 
> Since we're only calling ip_append_data() once here, the two conditions
> are identical.

You're right, I misread your patch. It would be easier to understand
if you just checked the return value of ip_append_data, as done in
udp.c or raw.c.

<Prev in Thread] Current Thread [Next in Thread>