Commit 1157f153 authored by David Howells's avatar David Howells
Browse files

afs: Invalid op ID should abort with RXGEN_OPCODE



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: default avatarDavid Howells <dhowells@redhat.com>
parent 146a1192
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -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;