]> git.baikalelectronics.ru Git - kernel.git/commit
unix: Support peeking offset for datagram and seqpacket sockets
authorPavel Emelyanov <xemul@parallels.com>
Tue, 21 Feb 2012 07:31:51 +0000 (07:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2012 20:03:58 +0000 (15:03 -0500)
commitc806474da660ed99ee81572e8755a7f96292b940
tree25b5f83aa834490eb6a07e52db93b972e16e498f
parentbd88f1a4c767d98506fa9b5087b9aeec7adda32e
unix: Support peeking offset for datagram and seqpacket sockets

The sk_peek_off manipulations are protected with the unix_sk->readlock mutex.
This mutex is enough since all we need is to syncronize setting the offset
vs reading the queue head. The latter is fully covered with the mentioned lock.

The recently added __skb_recv_datagram's offset is used to pick the skb to
read the data from.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c