diff options
author | Jens Axboe <[email protected]> | 2015-10-09 10:40:29 -0600 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2015-10-09 10:40:29 -0600 |
commit | 54ef2b96879334caf8803fdd93b4c556d709d6fd (patch) | |
tree | 05cfeb36feeb4451f8f4c7069a86ae3490027daf /net/unix/af_unix.c | |
parent | f7e7868b4743f1cc5e59e6e0ddd3ccf9cfe53a1b (diff) | |
parent | fd48ca384960c831d4fae4636282e422e140ca7c (diff) |
Merge branch 'for-4.4/core' into for-4.4/drivers
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 15 |
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); |