Skip to content

Commit

Permalink
SUNRPC: task should be exit if encode return EKEYEXPIRED more times
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
z00467499 authored and amschuma-ntap committed May 9, 2019
1 parent f02f375 commit 9c5948c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9c5948c

Please sign in to comment.