diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-28 13:17:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-28 13:17:20 +0100 |
commit | e4340bbb07dd38339c0773543dd928886e512a57 (patch) | |
tree | f38d9d2f929037325362328415b2a1e7bfe52a15 /net/unix/af_unix.c | |
parent | c13dc31adb04c3f85d54d2fa13e34206f25742eb (diff) | |
parent | a22c4d7e34402ccdf3414f64c50365436eba7b93 (diff) |
Merge branch 'linus' into core/rcu, to fix up a semantic conflict
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index ef31b40ad550..94f658235fb4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2064,6 +2064,11 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state) goto out; } + if (flags & MSG_PEEK) + skip = sk_peek_offset(sk, flags); + else + skip = 0; + do { int chunk; struct sk_buff *skb, *last; @@ -2112,7 +2117,6 @@ unlock: break; } - skip = sk_peek_offset(sk, flags); while (skip >= unix_skb_len(skb)) { skip -= unix_skb_len(skb); last = skb; @@ -2179,14 +2183,12 @@ unlock: if (UNIXCB(skb).fp) scm.fp = scm_fp_dup(UNIXCB(skb).fp); - if (skip) { - sk_peek_offset_fwd(sk, chunk); - skip -= chunk; - } + sk_peek_offset_fwd(sk, chunk); if (UNIXCB(skb).fp) break; + skip = 0; last = skb; last_len = skb->len; unix_state_lock(sk); |