Skip to content

Commit

Permalink
rxrpc: Return negative error code to kernel service
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells committed Oct 6, 2016
1 parent 94bc669 commit cf69207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rxrpc/recvmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ int rxrpc_kernel_recv_data(struct socket *sock, struct rxrpc_call *call,
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)
Expand Down

0 comments on commit cf69207

Please sign in to comment.