netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Ursula Braun <ursula.braun@de.ibm.com>,
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Subject: [patch 1/4] af_iucv: recvmsg problem for SOCK_STREAM sockets
Date: Wed, 19 Mar 2014 07:57:59 +0100	[thread overview]
Message-ID: <20140319065813.285865119@de.ibm.com> (raw)
In-Reply-To: 20140319065758.841490297@de.ibm.com

[-- Attachment #1: 600-af-iucv-recvmsg.diff --]
[-- Type: text/plain, Size: 1019 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

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>
---
 net/iucv/af_iucv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index c4b7218..a5e0311 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;
 			}
 		}

  reply	other threads:[~2014-03-19  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19  6:57 [patch 0/4] s390: network patches for net-next frank.blaschka
2014-03-19  6:57 ` frank.blaschka [this message]
2014-03-19  6:58 ` [patch 2/4] qeth: make qeth_query_card_info_cb() static frank.blaschka
2014-03-19  6:58 ` [patch 3/4] qeth: Removed unused parameter frank.blaschka
2014-03-19  6:58 ` [patch 4/4] qeth: Fix IP version detection for VLAN traffic frank.blaschka
2014-03-20  4:07 ` [patch 0/4] s390: network patches for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140319065813.285865119@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ursula.braun@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).