]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
SUNRPC: RPC level errors should set task->tk_rpc_status
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 3 Aug 2022 18:55:03 +0000 (14:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:15:15 +0000 (17:15 +0200)
[ Upstream commit ed06fce0b034b2e25bd93430f5c4cbb28036cc1a ]

Fix up a case in call_encode() where we're failing to set
task->tk_rpc_status when an RPC level error occurred.

Fixes: 9c5948c24869 ("SUNRPC: task should be exit if encode return EKEYEXPIRED more times")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/clnt.c

index c5af31312e0cf59d36dcd47287df7b77d86f9220..78c6648af7827d535eec9a441c80af2d0fb86be6 100644 (file)
@@ -1867,7 +1867,7 @@ call_encode(struct rpc_task *task)
                        break;
                case -EKEYEXPIRED:
                        if (!task->tk_cred_retry) {
-                               rpc_exit(task, task->tk_status);
+                               rpc_call_rpcerror(task, task->tk_status);
                        } else {
                                task->tk_action = call_refresh;
                                task->tk_cred_retry--;