Message ID | 1442740705-16452-1-git-send-email-aconole@bytheb.org |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 03ee4d3..988fbbd4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2179,9 +2179,24 @@ 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; + } - break; + if (UNIXCB(skb).fp) + break; + + /* XXX - this is ugly; a better approach would be + * rewriting this function + */ + last = skb; + last_len = skb->len; + unix_state_lock(&sk); + skb = skb_peek_next(skb, &sk->sk_receive_queue); + if (skb) + goto again; + goto unlock; } } while (size);