mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
afs: Invalid op ID should abort with RXGEN_OPCODE
[ Upstream commit 1157f153f3 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
972e7b7cbf
commit
ab23906116
@@ -84,6 +84,8 @@ int afs_abort_to_error(u32 abort_code)
|
|||||||
case RXKADDATALEN: return -EKEYREJECTED;
|
case RXKADDATALEN: return -EKEYREJECTED;
|
||||||
case RXKADILLEGALLEVEL: return -EKEYREJECTED;
|
case RXKADILLEGALLEVEL: return -EKEYREJECTED;
|
||||||
|
|
||||||
|
case RXGEN_OPCODE: return -ENOTSUPP;
|
||||||
|
|
||||||
default: return -EREMOTEIO;
|
default: return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ static void afs_deliver_to_call(struct afs_call *call)
|
|||||||
abort_code, -ret, "KNC");
|
abort_code, -ret, "KNC");
|
||||||
goto do_abort;
|
goto do_abort;
|
||||||
case -ENOTSUPP:
|
case -ENOTSUPP:
|
||||||
abort_code = RX_INVALID_OPERATION;
|
abort_code = RXGEN_OPCODE;
|
||||||
rxrpc_kernel_abort_call(afs_socket, call->rxcall,
|
rxrpc_kernel_abort_call(afs_socket, call->rxcall,
|
||||||
abort_code, -ret, "KIV");
|
abort_code, -ret, "KIV");
|
||||||
goto do_abort;
|
goto do_abort;
|
||||||
|
|||||||
Reference in New Issue
Block a user