]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
afs: Invalid op ID should abort with RXGEN_OPCODE
authorDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:47 +0000 (16:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:47 +0000 (16:27 +0000)
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
fs/afs/rxrpc.c

index 91ea1aa0d8b3ab0a817b525e9f9b3deec98f775f..100b207efc9eaddff4ed9f7e0e4415ed62ba2880 100644 (file)
@@ -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;
        }
 }
index bf45307ff201d00d082977a567d7a46c739eceeb..bf7761fe6ef5c71774780f32f212505bee80b7bc 100644 (file)
@@ -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;