From: Al Viro <viro@ZenIV.linux.org.uk>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH] RxRPC: Fix the conversion to iov_iter
Date: Fri, 10 Apr 2015 03:38:21 +0100 [thread overview]
Message-ID: <20150410023821.GA889@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20150410023652.GZ889@ZenIV.linux.org.uk>
This commit:
commit af2b040e470b470bfc881981db3c796072853eae
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Thu Nov 27 21:44:24 2014 -0500
Subject: rxrpc: switch rxrpc_send_data() to iov_iter primitives
incorrectly changes a do-while loop into a while loop in rxrpc_send_data().
Unfortunately, at least one pass through the loop is required - even if
there is no data - so that the packet the closes the send phase can be
sent if MSG_MORE is not set.
Author: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
index 8331c95..833a33b 100644
--- a/net/rxrpc/ar-output.c
+++ b/net/rxrpc/ar-output.c
@@ -548,7 +548,7 @@ static int rxrpc_send_data(struct kiocb *iocb,
copied = 0;
if (len > iov_iter_count(&msg->msg_iter))
len = iov_iter_count(&msg->msg_iter);
- while (len) {
+ do {
int copy;
if (!skb) {
@@ -689,7 +689,7 @@ static int rxrpc_send_data(struct kiocb *iocb,
rxrpc_queue_packet(call, skb, !iov_iter_count(&msg->msg_iter) && !more);
skb = NULL;
}
- }
+ } while (len > 0);
success:
ret = copied;
next prev parent reply other threads:[~2015-04-10 2:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 2:36 [git pull] rxrpc regression fix Al Viro
2015-04-10 2:38 ` Al Viro [this message]
2015-04-10 3:01 ` David Miller
2015-04-10 3:07 ` Al Viro
2015-04-10 3:45 ` 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=20150410023821.GA889@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.