Skip to content

Commit

Permalink
af_iucv: recvmsg problem for SOCK_STREAM sockets
Browse files Browse the repository at this point in the history
Commit f9c41a6 introduced
a problem for SOCK_STREAM sockets, when only part of the
incoming iucv message is received by user space. In this
case the remaining data of the iucv message is lost.
This patch makes sure an incompletely received iucv message
is queued back to the receive queue.

Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: Frank Blaschka <[email protected]>
Reported-by: Hendrik Brueckner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
braunu authored and davem330 committed Mar 20, 2014
1 parent 2024816 commit 2f139a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,7 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
if (sk->sk_type == SOCK_STREAM) {
if (copied < rlen) {
IUCV_SKB_CB(skb)->offset = offset + copied;
skb_queue_head(&sk->sk_receive_queue, skb);
goto done;
}
}
Expand Down

0 comments on commit 2f139a5

Please sign in to comment.