summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-10-12 15:52:34 +0300
committerIngo Molnar <mingo@kernel.org>2015-10-12 15:52:34 +0300
commitcdbcd239e2e264dc3ef7bc7865bcb8ec0023876f (patch)
tree94f5d2cf92ebb2eee640862cb2beaab6503bf846 /net/unix/af_unix.c
parent6e06780a98f149f131d46c1108d4ae27f05a9357 (diff)
parent7e0abcd6b7ec1452bf4a850fccbae44043c05806 (diff)
downloadlinux-cdbcd239e2e264dc3ef7bc7865bcb8ec0023876f.tar.xz
Merge branch 'x86/ras' into ras/core, to pick up changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 03ee4d359f6a..ef31b40ad550 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2179,8 +2179,21 @@ unlock:
if (UNIXCB(skb).fp)
scm.fp = scm_fp_dup(UNIXCB(skb).fp);
- sk_peek_offset_fwd(sk, chunk);
+ if (skip) {
+ sk_peek_offset_fwd(sk, chunk);
+ skip -= chunk;
+ }
+ if (UNIXCB(skb).fp)
+ break;
+
+ last = skb;
+ last_len = skb->len;
+ unix_state_lock(sk);
+ skb = skb_peek_next(skb, &sk->sk_receive_queue);
+ if (skb)
+ goto again;
+ unix_state_unlock(sk);
break;
}
} while (size);