From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 107F7C0502C for ; Mon, 29 Aug 2022 11:09:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbiH2LJI (ORCPT ); Mon, 29 Aug 2022 07:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231182AbiH2LIr (ORCPT ); Mon, 29 Aug 2022 07:08:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFDD82CC8B; Mon, 29 Aug 2022 04:05:49 -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 ams.source.kernel.org (Postfix) with ESMTPS id F11DCB80EF8; Mon, 29 Aug 2022 11:04:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57B55C433D6; Mon, 29 Aug 2022 11:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771066; bh=nBzjdW6fb64fB9AGAlHPIidKuMsr/NFHuwJh6wcAEk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRDNLL8kOhHV2Hhz5Ep69CIWFlc6pPbMXikBr7Uz0vJmVcSKUDnGudRjKQg6aAdM1 /HcWWiQyW3MrT0o5Q6y4mEZPLiD9+GwxennBtIDBIVHy5HZzurZy8ce9Q1zMW/1H9/ QmxTzkcd3l8l2LKF+NyJ5SnIsBCbZ2FmUkQM9Kj0= 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.15 035/136] SUNRPC: RPC level errors should set task->tk_rpc_status Date: Mon, 29 Aug 2022 12:58:22 +0200 Message-Id: <20220829105806.039829876@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105804.609007228@linuxfoundation.org> References: <20220829105804.609007228@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@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 6a035e9339d20..ca2a494d727b2 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1881,7 +1881,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