Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496567

[PATCH net 10/13] rxrpc: Return negative error code to kernel service

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net 10/13] rxrpc: Return negative error code to kernel service
Date 2016-10-06 12:10 +0200
Message-ID <spdML-79a-97@gated-at.bofh.it> (permalink)
References <spdMJ-79a-3@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


In rxrpc_kernel_recv_data(), when we return the error number incurred by a
failed call, we must negate it before returning it as it's stored as
positive (that's what we have to pass back to userspace).

Signed-off-by: David Howells <dhowells@redhat.com>
---

 net/rxrpc/recvmsg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index 3fa7771c2a9d..db5b02a47518 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -652,7 +652,7 @@ excess_data:
 	goto out;
 call_complete:
 	*_abort = call->abort_code;
-	ret = call->error;
+	ret = -call->error;
 	if (call->completion == RXRPC_CALL_SUCCEEDED) {
 		ret = 1;
 		if (size > 0)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 00/13] rxrpc: Fixes David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 10/13] rxrpc: Return negative error code to kernel  service David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless  endpoint David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 05/13] rxrpc: Fix warning by splitting  rxrpc_send_call_packet() David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 13/13] rxrpc: Don't request an ACK on the last DATA  packet of a call's Tx phase David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  [PATCH net 07/13] rxrpc: Partially handle OpenAFS's improper  termination of calls David Howells <dhowells@redhat.com> - 2016-10-06 12:10 +0200
  Re: [PATCH net-next 00/13] rxrpc: Fixes David Miller <davem@davemloft.net> - 2016-10-07 03:10 +0200

csiph-web