Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp24911pxh; Thu, 7 Apr 2022 12:52:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD3UPEWVvGEn2WvqAiYv/BzLbDEl/TnEpNcZ4eFdAITGVsq0ZLkPuoR75Dqr1LjRH4mEeP X-Received: by 2002:a17:90a:f405:b0:1cb:10db:6ea3 with SMTP id ch5-20020a17090af40500b001cb10db6ea3mr5656298pjb.201.1649361177375; Thu, 07 Apr 2022 12:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361177; cv=none; d=google.com; s=arc-20160816; b=MGsOu3EzauswCKCBHkplwTSW1N5ZaOexbRcfAP4Lt/OJG8mhH+sIeVmG7hooJ4mEQi oJmBZRTddQoFALF23OAHTcWCHZFnTGkLrjWZbBn519xmqOBxYD3islsh+jq7r2A312+n XGERYDFFnI1ML0WXy5QMFKKdrUipfrBZYdVEF92IXJ5Rbyo/vm6HQgTvgMizjejrMB7J xSkh5tk4bOt26OcDFAVJBwJtlTplW3aFa1IkZAzL5dwjFMroPqRlkTqcFb5P9+EkWx9Q z/zsfnx2f04bLQ/wwvnmnrJsU6C9E50C7usstP3373RGu/vTEtHbXKiEns4f2YleNl3m 9smg== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZxhjYidIYodJjpuVaLDyqwi633HmyNhtZU7QCc6HYIo=; b=dBZBmw7eRyZ6HvGra31S6zFTF1mnUR7BNIdKPohtqP05Hd7sGGZCjP4Q6kBlzk5gbV 9slk/HKQGmE4bxZoUkvxxaB5TI647gaOslK7cvNCbYKf0HDU2kCnbCB9ia4ZEGvnZwR0 zgIK5lB5/uATCH0tbEav3YiYD6GPzYdLs9vkpo0SPPzhYMcgfNyjo5i24LucgF6YgF7X 4rvGY6kUMDs43rL3YdsYQoO2NulY1v85xRYAwdfZQkBcplLmRxwMt0WIV3SCV2rE4e5L +Se+btv+Fb+UmiMCJmlsRQ1nArMtWduQBC+3Va7wPvaRoI+id0KZOa+7KX9TGXl1Qy9M 2wiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kagtjd/d"; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z24-20020aa791d8000000b004fa3a8e006bsi17685883pfa.290.2022.04.07.12.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:52:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kagtjd/d"; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 66196274E79; Thu, 7 Apr 2022 12:23:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345080AbiDGPqx (ORCPT + 99 others); Thu, 7 Apr 2022 11:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345123AbiDGPqh (ORCPT ); Thu, 7 Apr 2022 11:46:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C18C6B54 for ; Thu, 7 Apr 2022 08:44:33 -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 9CEEE61EB6 for ; Thu, 7 Apr 2022 15:44:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E962C385B2 for ; Thu, 7 Apr 2022 15:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649346271; bh=JdLNTLNoccxME1ykAb6vaTCpoobIqzNPmf+4E3wWhbQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kagtjd/dZvZ/+AyyYVU6oxUubBo8nSgkDykUAzBT4yC9wrv/pRo/dEYEyKsF7DKQS 57PdCFqZQs4nJdtIdvR1m8tGZv9xe4wi3JP5hBfvR2xYyEldRA96EtNkmA1KZ3MIR8 xEFGO/UKo0+Gl42btaHgWJlLrxKdcFgYl2UEV2ajXtMsPxhP7rGhJihiFMmAdpTDJP d8AOXxJthBqWNMBPJQ2ZirrmtaZzFTTh20dJtvtCEi+C2LBiIG1V/8kCe9pnWRxleR KmktIWcvrF3yOTmKW4iQs+PPGOCquFPYTHvmu+pOU3zLNlcnDQmWYA9L9aTmqZGxwC xgy/Y4VNcNzKA== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 2/7] SUNRPC: Handle ENOMEM in call_transmit_status() Date: Thu, 7 Apr 2022 11:38:04 -0400 Message-Id: <20220407153809.1053261-2-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407153809.1053261-1-trondmy@kernel.org> References: <20220407153809.1053261-1-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-nfs@vger.kernel.org From: Trond Myklebust Both call_transmit() and call_bc_transmit() can now return ENOMEM, so let's make sure that we handle the errors gracefully. Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 3c7407104d54..07328f1d3885 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2200,6 +2200,7 @@ call_transmit_status(struct rpc_task *task) * socket just returned a connection error, * then hold onto the transport lock. */ + case -ENOMEM: case -ENOBUFS: rpc_delay(task, HZ>>2); fallthrough; @@ -2283,6 +2284,7 @@ call_bc_transmit_status(struct rpc_task *task) case -ENOTCONN: case -EPIPE: break; + case -ENOMEM: case -ENOBUFS: rpc_delay(task, HZ>>2); fallthrough; -- 2.35.1