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


Groups > linux.kernel > #1596323 > unrolled thread

[PATCH 19/27] afs: Invalid op ID should abort with RXGEN_OPCODE

Started byDavid Howells <dhowells@redhat.com>
First post2017-03-09 20:00 +0100
Last post2017-03-09 20:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 19/27] afs: Invalid op ID should abort with RXGEN_OPCODE David Howells <dhowells@redhat.com> - 2017-03-09 20:00 +0100

#1596323 — [PATCH 19/27] afs: Invalid op ID should abort with RXGEN_OPCODE

FromDavid Howells <dhowells@redhat.com>
Date2017-03-09 20:00 +0100
Subject[PATCH 19/27] afs: Invalid op ID should abort with RXGEN_OPCODE
Message-ID<tjbs7-I0-35@gated-at.bofh.it>
When we are given an invalid operation ID, we should abort that with
RXGEN_OPCODE rather than RX_INVALID_OPERATION.

Also map RXGEN_OPCODE to -ENOTSUPP.

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

 fs/afs/misc.c  |    2 ++
 fs/afs/rxrpc.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index 91ea1aa0d8b3..100b207efc9e 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -84,6 +84,8 @@ int afs_abort_to_error(u32 abort_code)
 	case RXKADDATALEN:	return -EKEYREJECTED;
 	case RXKADILLEGALLEVEL:	return -EKEYREJECTED;
 
+	case RXGEN_OPCODE:	return -ENOTSUPP;
+
 	default:		return -EREMOTEIO;
 	}
 }
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index bf45307ff201..bf7761fe6ef5 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -465,7 +465,7 @@ static void afs_deliver_to_call(struct afs_call *call)
 						abort_code, -ret, "KNC");
 			goto do_abort;
 		case -ENOTSUPP:
-			abort_code = RX_INVALID_OPERATION;
+			abort_code = RXGEN_OPCODE;
 			rxrpc_kernel_abort_call(afs_socket, call->rxcall,
 						abort_code, -ret, "KIV");
 			goto do_abort;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web