]> git.baikalelectronics.ru Git - kernel.git/commit
unix/stream: fix peeking with an offset larger than data in queue
authorBenjamin Poirier <bpoirier@suse.de>
Mon, 29 Apr 2013 11:42:14 +0000 (11:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Apr 2013 04:43:54 +0000 (00:43 -0400)
commit130d9d503a8c8746090c1c62fded7ad176c76d76
tree4a2aecd119c9c54944182ba665ad8279232e40ab
parentf8ca28e0d2de2961124e40b463064e6fa0485326
unix/stream: fix peeking with an offset larger than data in queue

Currently, peeking on a unix stream socket with an offset larger than len of
the data in the sk receive queue returns immediately with bogus data.

This patch fixes this so that the behavior is the same as peeking with no
offset on an empty queue: the caller blocks.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c