Skip to contentSkip to conversation

rxrpc regression fix

GIT PULL New Al Viro 2 participants 5 messages Apr 10, 2015

Subsystems (3)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

I've pulled a bunch of AFS stuff from dhowells; most of that
stuff is for-next fodder, but the first commit in there is a 4.0 regression; seeing that it's net/rxrpc, I think it ought to go through your tree. Could you pull from
git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix

Shortlog:
David Howells (1):
RxRPC: Fix the conversion to iov_iter

Diffstat:

 net/rxrpc/ar-output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
author
#1 lore raw

PATCH 1/1 RxRPC: Fix the conversion to iov_iter

This commit:

commit af2b040e470b470bfc881981db3c796072853eae
Author: Al Viro <[email protected]>
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 <[email protected]>

---

net/rxrpc/ar-output.c +2 -2
index 8331c95..833a33b 100644
@@ -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;
maintainer
#2 lore raw
In reply to Al Viro

From: Al Viro <[email protected]>
Date: Fri, 10 Apr 2015 03:36:52 +0100

Quoted 2 lines

Could you pull from
git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix

[davem@localhost net]$ git pull git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix
fatal: remote error: access denied or repository not exported: /scm/pub/linux/kernel/git/viro/vfs.git

author
#3 lore raw
Quoted 8 lines · David Miller

From: Al Viro <[email protected]>
Date: Fri, 10 Apr 2015 03:36:52 +0100

Quoted 2 lines

Could you pull from
git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix

[davem@localhost net]$ git pull git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix
fatal: remote error: access denied or repository not exported: /scm/pub/linux/kernel/git/viro/vfs.git

*blink* Actual URI is

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git rxrpc-fix

IOW, I'd managed to type path components in the wrong order scmp/pub instead of pub/scm. My apologies...

maintainer
#4 lore raw

From: Al Viro <[email protected]>
Date: Fri, 10 Apr 2015 04:07:57 +0100

Quoted 10 lines · David Miller
Quoted 8 lines

From: Al Viro <[email protected]>
Date: Fri, 10 Apr 2015 03:36:52 +0100

Quoted 2 lines

Could you pull from
git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix

[davem@localhost net]$ git pull git://git.kernel.org/scm/pub/linux/kernel/git/viro/vfs.git rxrpc-fix
fatal: remote error: access denied or repository not exported: /scm/pub/linux/kernel/git/viro/vfs.git

Quoted 6 lines

*blink* Actual URI is

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git rxrpc-fix

IOW, I'd managed to type path components in the wrong order scmp/pub instead of pub/scm. My apologies...

That works better, pulled, thanks Al.