Skip to content

Commit 9c5948c

Browse files
z00467499amschuma-ntap
authored andcommitted
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent f02f375 commit 9c5948c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

net/sunrpc/clnt.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,14 @@ call_encode(struct rpc_task *task)
18141814
rpc_delay(task, HZ >> 4);
18151815
break;
18161816
case -EKEYEXPIRED:
1817-
task->tk_action = call_refresh;
1817+
if (!task->tk_cred_retry) {
1818+
rpc_exit(task, task->tk_status);
1819+
} else {
1820+
task->tk_action = call_refresh;
1821+
task->tk_cred_retry--;
1822+
dprintk("RPC: %5u %s: retry refresh creds\n",
1823+
task->tk_pid, __func__);
1824+
}
18181825
break;
18191826
default:
18201827
rpc_call_rpcerror(task, task->tk_status);

0 commit comments

Comments
 (0)