Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp169807yba; Fri, 3 May 2019 23:30:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFL3ylS7sDiOTuu98a7dIc/YAlMIaIqvWxk7QYTwjz+N6RyISwSCSejd9A1Bbej+JPfu3Y X-Received: by 2002:a17:902:a583:: with SMTP id az3mr16416808plb.205.1556951409511; Fri, 03 May 2019 23:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556951409; cv=none; d=google.com; s=arc-20160816; b=ZH2IaoR2n11PTT+XTvEPez339ikI9psZd6tSrvY9W4cHnseOn7VK8dayJa7uwIVhBM EZQtBpprNB/s49IM/cc9zVSFlEHWHFvyNMlbGVL61BqtO0IMGmXfMYhqiSgT4MYNYyeh 7oLRNBEwQrAq+AoOQbQHwq6G48ujqt8skPMtXCht7ERfelj/brZh3OVmQm6BQu1AVWtg S+kDCaYzB3Rfw2/yzRCOrXNsO1DJmn3AZ+FUWO8u8iOfEHzbHbtfRhbZStM3StF8Q77u bo8sVrRjnMz9uTNijKWqt7fGRbFvjjMhDMUJwGgn1RbdZ8vh16LlA5cfm6+bLtZOy1u+ 1bcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=vAtRxROeksmctiggKyNvuCbUYErA86A+WguavCr+au0=; b=GznocG16unBl1K0+K6tcJQ/544VwaJ1tCPPMG3eaATqPUTuKPkmTeqIfPo0RaJ0IF9 vV9jg0+DAfQqhRPG4tK67lpRnUOv99wN0QQ6d5FMRvk0A9z+7Y4om20NL3LsFMi7LU3Z tHkgt2iEFq7+AWy7YUtu8Mql6SAyOwnHkhasfgRvcbJJleyUFOI4MWIsOzTwgDnoDis5 QzOG71zTM1AIh0ZS+8tUmlZ0K1c7dUAAeHb67UB9kuN8B01qd3BNUsI6cCSq3x1MAU3f +alqNHvG8ke2uGph02vTePxivr1pPE2PpGoWNw/WnfwRiPCOr3m9Gd/NxFn3TEqy9QQN voFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si4028788pgr.77.2019.05.03.23.29.32; Fri, 03 May 2019 23:30:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725819AbfEDGQT (ORCPT + 99 others); Sat, 4 May 2019 02:16:19 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7718 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725801AbfEDGQT (ORCPT ); Sat, 4 May 2019 02:16:19 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 53207C76FE5F7E71F8FF; Sat, 4 May 2019 14:16:15 +0800 (CST) Received: from [127.0.0.1] (10.184.189.120) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Sat, 4 May 2019 14:16:14 +0800 Subject: Re: [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times To: , , , , , References: <1556530351-81780-1-git-send-email-zhangxiaoxu5@huawei.com> From: "zhangxiaoxu (A)" Message-ID: Date: Sat, 4 May 2019 14:15:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1556530351-81780-1-git-send-email-zhangxiaoxu5@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.184.189.120] X-CFilter-Loop: Reflected Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org ping. On 4/29/2019 5:32 PM, ZhangXiaoxu wrote: > 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 > --- > net/sunrpc/clnt.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c > index 8ff11dc..a32d3f1 100644 > --- a/net/sunrpc/clnt.c > +++ b/net/sunrpc/clnt.c > @@ -1793,7 +1793,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_exit(task, task->tk_status); >