diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-24 11:12:33 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-24 11:12:33 +0300 |
commit | 93da8b221da95a97316e518c94f03856e5d610a9 (patch) | |
tree | 23787f3c0d02507f20d804aac23ef209d66a7586 /net/unix/af_unix.c | |
parent | ba63f76e22ee723819c8cec86b31f7ea3182b2ed (diff) | |
parent | 143c97cc652949893c8056c679012f0aeccb80e5 (diff) | |
download | linux-93da8b221da95a97316e518c94f03856e5d610a9.tar.xz |
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 7b52a380d710..be8982b4f8c0 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2304,10 +2304,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state, */ mutex_lock(&u->iolock); - if (flags & MSG_PEEK) - skip = sk_peek_offset(sk, flags); - else - skip = 0; + skip = max(sk_peek_offset(sk, flags), 0); do { int chunk; |