From 2f139a5d8225666faee9f1d3c5629c4e5ff947aa Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Wed, 19 Mar 2014 07:57:59 +0100 Subject: af_iucv: recvmsg problem for SOCK_STREAM sockets Commit f9c41a62bba3f3f7ef3541b2a025e3371bcbba97 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 Signed-off-by: Frank Blaschka Reported-by: Hendrik Brueckner Signed-off-by: David S. Miller --- net/iucv/af_iucv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/iucv/af_iucv.c') diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index c4b7218058b6..a5e03119107a 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -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; } } -- cgit v1.2.3-59-g8ed1b