aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorZhangXiaoxu <zhangxiaoxu5@huawei.com>2019-04-29 17:32:31 +0800
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-05-09 16:26:56 -0400
commit9c5948c248696ca60c56ec5a608e225c4ab8a854 (patch)
tree1969a626d5db2dad4cb8352930df563a427299d0 /net/sunrpc/clnt.c
parentNFS4: Fix v4.0 client state corruption when mount (diff)
downloadlinux-dev-9c5948c248696ca60c56ec5a608e225c4ab8a854.tar.xz
linux-dev-9c5948c248696ca60c56ec5a608e225c4ab8a854.zip
SUNRPC: task should be exit if encode return EKEYEXPIRED more times
If the rpc.gssd always return cred success, but now the cred is expired, then the task will loop in call_refresh and call_transmit. Exit the rpc task after retry. Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to '')
-rw-r--r--net/sunrpc/clnt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 369a2648dafc..c1f1afabd024 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1814,7 +1814,14 @@ call_encode(struct rpc_task *task)
rpc_delay(task, HZ >> 4);
break;
case -EKEYEXPIRED:
- task->tk_action = call_refresh;
+ if (!task->tk_cred_retry) {
+ rpc_exit(task, task->tk_status);
+ } else {
+ task->tk_action = call_refresh;
+ task->tk_cred_retry--;
+ dprintk("RPC: %5u %s: retry refresh creds\n",
+ task->tk_pid, __func__);
+ }
break;
default:
rpc_call_rpcerror(task, task->tk_status);