All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net 10/13] rxrpc: Return negative error code to kernel service
Date: Thu, 06 Oct 2016 11:05:06 +0100	[thread overview]
Message-ID: <147574830618.30350.11859903360731638231.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <147574823645.30350.16131031458272035074.stgit@warthog.procyon.org.uk>

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)

  parent reply	other threads:[~2016-10-06 10:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 10:03 [PATCH net-next 00/13] rxrpc: Fixes David Howells
2016-10-06 10:04 ` [PATCH net 01/13] rxrpc: Accesses of rxrpc_local::service need to be RCU managed David Howells
2016-10-06 10:04 ` [PATCH net 02/13] rxrpc: Fix duplicate const David Howells
2016-10-06 10:04 ` [PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless endpoint David Howells
2016-10-06 10:04 ` [PATCH net 04/13] rxrpc: Only ping for lost reply in client call David Howells
2016-10-06 10:04 ` [PATCH net 05/13] rxrpc: Fix warning by splitting rxrpc_send_call_packet() David Howells
2016-10-06 10:04 ` [PATCH net 06/13] rxrpc: Fix loss of PING RESPONSE ACK production due to PING ACKs David Howells
2016-10-06 10:04 ` [PATCH net 07/13] rxrpc: Partially handle OpenAFS's improper termination of calls David Howells
2016-10-06 10:04 ` [PATCH net 08/13] rxrpc: Queue the call on expiry David Howells
2016-10-06 10:04 ` [PATCH net 09/13] rxrpc: Add missing notification David Howells
2016-10-06 10:05 ` David Howells [this message]
2016-10-06 10:05 ` [PATCH net 11/13] afs: Check for fatal error when in waiting for ack state David Howells
2016-10-06 10:05 ` [PATCH net 12/13] rxrpc: Need to produce an ACK for service op if op takes a long time David Howells
2016-10-06 10:05 ` [PATCH net 13/13] rxrpc: Don't request an ACK on the last DATA packet of a call's Tx phase David Howells
2016-10-07  1:04 ` [PATCH net-next 00/13] rxrpc: Fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=147574830618.30350.11859903360731638231.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.