[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150410023821.GA889@ZenIV.linux.org.uk>
Date: Fri, 10 Apr 2015 03:38:21 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>
Subject: [PATCH] RxRPC: Fix the conversion to iov_iter
This commit:
commit af2b040e470b470bfc881981db3c796072853eae
Author: Al Viro <viro@...iv.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@...hat.com>
Signed-off-by: David Howells <dhowells@...hat.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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists