summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-10-06 10:11:50 +0300
committerDavid Howells <dhowells@redhat.com>2016-10-06 10:11:50 +0300
commitcf69207afa2a750ba78782bb4ff4d72c1efb8e6b (patch)
tree61f078ad0f755304a3603ce57c28c2d47b9e995c /net
parent94bc669efa3beb1f6b171f5a3225079bc457d4a2 (diff)
downloadlinux-cf69207afa2a750ba78782bb4ff4d72c1efb8e6b.tar.xz
rxrpc: Return negative error code to kernel service
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>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/recvmsg.c2
1 files changed, 1 insertions, 1 deletions
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)