Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reported-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ursula Braun and committed by
David S. Miller
2f139a5d 20248162

+1
+1
net/iucv/af_iucv.c
··· 1382 1382 if (sk->sk_type == SOCK_STREAM) { 1383 1383 if (copied < rlen) { 1384 1384 IUCV_SKB_CB(skb)->offset = offset + copied; 1385 + skb_queue_head(&sk->sk_receive_queue, skb); 1385 1386 goto done; 1386 1387 } 1387 1388 }