]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: skb_free_datagram_locked() fix
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 4 May 2010 06:18:14 +0000 (23:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 May 2010 06:18:14 +0000 (23:18 -0700)
commit93bb64eac10aad3dae6178d7da94765f207d121f
tree5f0990ed1a0a9fa9483d828a16235085d5d84215
parentf5460618405eec8c3300947a499011528a115acd
net: skb_free_datagram_locked() fix

Commit 4b0b72f7dd617b ( net: speedup udp receive path )
introduced a bug in skb_free_datagram_locked().

We should not skb_orphan() skb if we dont have the guarantee we are the
last skb user, this might happen with MSG_PEEK concurrent users.

To keep socket locked for the smallest period of time, we split
consume_skb() logic, inlined in skb_free_datagram_locked()

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/datagram.c