Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276239
b: refs/heads/master
c: 0884d7a
h: refs/heads/master
i:
  276237: f406a4a
  276235: e3eb83c
  276231: f323416
  276223: aae0794
v: v3
  • Loading branch information
Alexey Moiseytsev authored and David S. Miller committed Nov 26, 2011
1 parent 8c57979 commit 613eca0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83b98fb46ff136945f9d06a9bf6e6aae2ffc37b3
refs/heads/master: 0884d7aa24e15e72b3c07f7da910a13bb7df3592
4 changes: 4 additions & 0 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
if ((UNIXCB(skb).pid != siocb->scm->pid) ||
(UNIXCB(skb).cred != siocb->scm->cred)) {
skb_queue_head(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);
break;
}
} else {
Expand All @@ -1974,6 +1975,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
chunk = min_t(unsigned int, skb->len, size);
if (memcpy_toiovec(msg->msg_iov, skb->data, chunk)) {
skb_queue_head(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);
if (copied == 0)
copied = -EFAULT;
break;
Expand All @@ -1991,6 +1993,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
/* put the skb back if we didn't use it up.. */
if (skb->len) {
skb_queue_head(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);
break;
}

Expand All @@ -2006,6 +2009,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,

/* put message back and return */
skb_queue_head(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);
break;
}
} while (size);
Expand Down

0 comments on commit 613eca0

Please sign in to comment.