Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3071331rwe; Mon, 29 Aug 2022 05:28:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ztm9glPMbUtGYM2aQ79u4DRK8d/yjwv1iuJw164U//DCoJcnf7b99i7ifV3R/hWSA1yVC X-Received: by 2002:a63:174c:0:b0:42a:81ff:6913 with SMTP id 12-20020a63174c000000b0042a81ff6913mr13462330pgx.625.1661776107269; Mon, 29 Aug 2022 05:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661776107; cv=none; d=google.com; s=arc-20160816; b=WCrGegsE7BczQ2CuZ2ydVXgIu/h/9dmgamUo0yBhovWHcUomRXux9Mc8f8FzH4lLAx RV3L4Jr1XFBQ6UDxuZl9Dxrgnkn6FWcxBazRW2t1FsPE3Af8PUJSGQ9eYXdHYkCWhPAK V+JaHtOPFSMt80crXWlJgwqsDN8WvD+1fWgVRo9I440/KBQAOgo/mez5CF6BZluc/PTq aQkovTjiQxRiDWT0Hac3RKkx19DRgVWWRmmMjHaEhGTcJGstBqo0chSfEO+f3DYXhNpi oKU/eQGJXQFiQd8hamHchKS1qFyGXpy9mxU3igp8XEY1IpEp9+sX1TMlKdfMN9F3NXZ7 Btkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C9woGPk6FPKV3TRSLur3liWnVSpPyAQVK18rz4DhiO8=; b=SorLpinmV7lLr3+17FlWaGkEUi2EPbdROy+xSGy4pBMe7QGx1OMf5LUBUEyPhktI6U hjDBBVLwJ452xDRsbloX2Xy6hDqHulJKM/z0EKuwVbZmaBtOsPmfDN/YVM2wZh1CZrDx OWGlnRCvacU7EQGxwmqWHz30aMVw1vdg852N4M8vtlTjFnLb0Hk7ubplnRKX/VGjuF/k +VRLPXlRUDh0ep92AQxgGCaoJESn1rGKV1ysanMdNGkF9wJOvKbfk8vzZMdQRay6+RM9 2HI7HMhZeqq2yl58aRYBvzeGAHqFV9luziFj6nWDXBvw57BLmx9ApB0s/CVdgEIWZeP2 klLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xCYv6zol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a170902ef5000b0016eec1292e4si8434740plx.500.2022.08.29.05.28.15; Mon, 29 Aug 2022 05:28:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xCYv6zol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231441AbiH2LQg (ORCPT + 99 others); Mon, 29 Aug 2022 07:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbiH2LOh (ORCPT ); Mon, 29 Aug 2022 07:14:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 200A071BCB; Mon, 29 Aug 2022 04:10:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D301E611F8; Mon, 29 Aug 2022 11:10:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5E8CC433D6; Mon, 29 Aug 2022 11:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771427; bh=w7yZ9TALBK8/li3U2l9zjEx9kdTG3BBKn5dq1MRRWwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xCYv6zolbzGwh4Svd1gAf2yO1Gy7dtPuKf7YJGJS+64blCJFxDVWpPkB59Zx/whvJ 0Z6oWqm7XPjK8feOVrtv4QF/XbcthyuLzBP34eLi/k3xxEpt3RTHeLUpg2vizsWxGb HgJqbJKQFLwxxU3b1Kki49l+u2s/wEaMMpXuNouA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Sasha Levin Subject: [PATCH 5.19 020/158] SUNRPC: RPC level errors should set task->tk_rpc_status Date: Mon, 29 Aug 2022 12:57:50 +0200 Message-Id: <20220829105809.669024448@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Trond Myklebust [ Upstream commit ed06fce0b034b2e25bd93430f5c4cbb28036cc1a ] Fix up a case in call_encode() where we're failing to set task->tk_rpc_status when an RPC level error occurred. Fixes: 9c5948c24869 ("SUNRPC: task should be exit if encode return EKEYEXPIRED more times") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 733f9f2260926..c1a01947530f0 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1888,7 +1888,7 @@ call_encode(struct rpc_task *task) break; case -EKEYEXPIRED: if (!task->tk_cred_retry) { - rpc_exit(task, task->tk_status); + rpc_call_rpcerror(task, task->tk_status); } else { task->tk_action = call_refresh; task->tk_cred_retry--; -- 2.35.1