[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141014.161225.1399177558139744041.davem@davemloft.net>
Date: Tue, 14 Oct 2014 16:12:25 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: vvs@...allels.com
Cc: netdev@...r.kernel.org, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, kaber@...sh.net, eric.dumazet@...il.com
Subject: Re: [PATCH v2] ipv4: dst_entry leak in ip_append_data()
From: Vasily Averin <vvs@...allels.com>
Date: Tue, 14 Oct 2014 08:57:14 +0400
> v2: adjust the indentation of the arguments __ip_append_data() call
>
> Fixes: 2e77d89b2fa8 ("net: avoid a pair of dst_hold()/dst_release() in ip_append_data()")
>
> If sk_write_queue is empty ip_append_data() executes ip_setup_cork()
> that "steals" dst entry from rt to cork. Later it calls __ip_append_data()
> that creates skb and adds it to sk_write_queue.
>
> If skb was added successfully following ip_push_pending_frames() call
> reassign dst entries from cork to skb, and kfree_skb frees dst_entry.
>
> However nobody frees stolen dst_entry if skb was not added into sk_write_queue.
>
> Signed-off-by: Vasily Averin <vvs@...allels.com>
Why doesn't ip_make_skb() need the same fix? It seems to do the same
thing.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists