summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 12:38:20 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 12:38:20 +0200
commit10d15322ed26652263a579bcb59dfd49ab8a30de (patch)
treeb1497de1b8ffd34b991cdf6e21de1c7a0a65f1de /net/unix/af_unix.c
parent0316d30ea3e66379cd30ed70a114bc282159bb4c (diff)
parente5a9f8d04660da7ef3a98260aa74c3976f9cb4cd (diff)
downloadlwn-10d15322ed26652263a579bcb59dfd49ab8a30de.tar.gz
lwn-10d15322ed26652263a579bcb59dfd49ab8a30de.zip
Merge remote-tracking branch 'mac80211-next/master' into next
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);