Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4655099yba; Sun, 12 May 2019 18:58:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWKtVW5cTKzs7q6o30rgdGnNC/qmgUoD/gjC1unH9+5oTPPgU4ur5yqF9j6k2oB0/pGLQY X-Received: by 2002:a17:902:a415:: with SMTP id p21mr14018265plq.286.1557712698624; Sun, 12 May 2019 18:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557712698; cv=none; d=google.com; s=arc-20160816; b=XIcShndR9WHArtBMru1iux8SFUy8Vg/5bEcziIojIAFRrQ4vTpEOspwe23Trzq+ybV t1TaV2KSHouWyB24x25pAkj3cdyokMJIeGnUVnQT0tusp4BmvhZEcZebTGNbaryIMTKu 9pHOzU7N69qIWrknutcq8jnOBemZzhp97gMHKH6o49QEk5YONktBPIrZlcHFs7JztAcR Ko9ECWx+j95WgPVCJXz+Gyq372tVIOJIsGD7eEQzrqoNOtc6Qmmy6QIsTT9XTHMnlKxZ PioEnfWrhdfJpqZKmuarOWaMGzjasN5Eqmefl8uVYhzrRMS3flYp381Ok6TiWqGIn7UW mTlQ== 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:references:to:from:subject; bh=qhUG1rXaac1m4LHZ5E/5uNDIfK7aGCQykwGR7xG+KGM=; b=kakVw6mT0lxDnFubkmKl2qbEQAMZZ1sRBJsp3RjqBkcJkkCFFvBYFYHctjbumXBprF 8mV3PAIA/Hu6FNt098DVCyv6Z5CaJFLTtBCpJqimFTyiRkg1qv2zOyx5swMlZ27tOGXK S0EXSTfH9SRtUNvG4UtmG1P4itjo9xnflFwkdD7KLv9SQEke8gZWXuQYnW82juhJ/Qdl BqPTQDFSzP/ifaTTNFkWTWXDj2W5hQo2rgznuGfmV/oXiEyJcEBhs7DqNS+Z9gW0y7XV ocn9qEinCRWXCPuf26N7Fbj5gwpAeHhQScFgPgXZV1Eb0/vVt93MKEPWWmUUQLylssG/ aRbw== 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 f13si16412092pga.385.2019.05.12.18.57.51; Sun, 12 May 2019 18:58:18 -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 S1727132AbfEMBvD (ORCPT + 99 others); Sun, 12 May 2019 21:51:03 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7744 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727054AbfEMBvD (ORCPT ); Sun, 12 May 2019 21:51:03 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id C5890FD6C62FC409CD23; Mon, 13 May 2019 09:49:00 +0800 (CST) Received: from [127.0.0.1] (10.184.189.120) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Mon, 13 May 2019 09:48:59 +0800 Subject: Re: [PATCH] SUNRPC: task should be exit if encode return EKEYEXPIRED more times From: "zhangxiaoxu (A)" To: , , , , , References: <1556530351-81780-1-git-send-email-zhangxiaoxu5@huawei.com> Message-ID: Date: Mon, 13 May 2019 09:48:49 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 5/4/2019 2:15 PM, zhangxiaoxu (A) wrote: > 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); >> > > > . >