Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp24620pxh; Thu, 7 Apr 2022 12:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpo3rypCbhmaeN/pa5y9ShAaF3p2/UhxyYwRaW4bSEdOqcdeeL9SxQi8ADFTEljrqJUSUv X-Received: by 2002:a63:1f55:0:b0:382:65eb:3073 with SMTP id q21-20020a631f55000000b0038265eb3073mr12813818pgm.624.1649361135127; Thu, 07 Apr 2022 12:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361135; cv=none; d=google.com; s=arc-20160816; b=gK6MY4DS1d9++wu71pHuocVybKkrYu06ho1I+qymt0dOfmVyWDXATCgo1GPXCnlOIj sV0LOt4SGOZQQ2J8+wim5djm9/98cDUHZtBnZla4mCypazQgO8gD49Ct3sHCD0WaAVMc x104Yp8ibhf2Qtkp5GG8ItE86f1MUag0Hez8QJ/1DRrnhJn14HAW0Yeyqv+W6hEFV82O bBdmmiPszjdvAZzty6rLqasdvcEXEFjDZ8WWQjBQlhK3+ks5eJJoF3HEx8aFU0JSYuEA k7ZpC5kI/MMcKJ6JlpDteRqKIJYuTFzbllp2mHQVlmqPG1L4fESTDdstLWmJivOjw6j7 xG6w== 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=a9BDA4WbqrqXPV7kKFfQNdqjZtHq9B2eK1fgyZkmmd4=; b=qlVHEIXh8Ee2hrqBD+gKMqAPI7WyTRAS6crG3IXSlYZGyMpq6Fatpz8fSGjsY9Ek9j 2yrvf0CK8wAqe51cOpo0RsRmQwklEIvaq2yQaBPoR1P9gkNGLT88qO/x+ZzKYaILTNtC f7Uv02G5p3QuJiHXG0Vvya37wzXiJa/Do7BtB/nNlkzeOf0NJf7BXvn/ULzhWgZUtrvI hxy85XqZ4AgPRaNSwGQY6TLS6NYxnPMOkHMIzgUhNuCGbfHf5kF37WfECYNTFMsZ+E7w Kgw/dKL+568Y1fuA8VS9vAkTWQHuKISb4Jwyvz5L/nIIH6i1zHX7a1/eOlpz58GDY/eJ TP8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iDg8bn6A; 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 h1-20020a170902eec100b0015632bfb19esi465292plb.466.2022.04.07.12.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:52:15 -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=iDg8bn6A; 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 EA7FA271389; Thu, 7 Apr 2022 12:23:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347008AbiDGSyb (ORCPT + 99 others); Thu, 7 Apr 2022 14:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347007AbiDGSy3 (ORCPT ); Thu, 7 Apr 2022 14:54:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C0E195318 for ; Thu, 7 Apr 2022 11:52:28 -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 ED924B82964 for ; Thu, 7 Apr 2022 18:52:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8195DC385A6 for ; Thu, 7 Apr 2022 18:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649357545; bh=EnGFPXwFmV30OHTUGDdJOtNW6uPHvBWYnfRHsJMk4s0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iDg8bn6ApcHl9RD+xRX6JzkCx1OLEUY/d5NyON/AYtZ9rb0V2qyrRAL5gfhPtIPRI Lf9Ig9vSVSs7kzg/MCF1Y/WB5alarC5A8rkzDcQP8MMA4G627C1R2plpsnPplb8gCF fXQ6OfwuGIcm8h77cAxNbwCUWvydc/C7l1eIh0mvOzgoxVJseF3Z9VKX4SuzXV02i6 Lb2gt78jJ+oRK/5nyX7v5ZKvGsCyBqj63lt0xT2pcb3iJPvf/b5U8j+KdUwe2209fU OJESiAmP2HbJb4wttKW2EhgcPPUxMHVns5QIMoYtJSXzrnvsB3nqVzum5GJQPsEThm T0HFhM+z+bIlQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v2 2/8] SUNRPC: Handle ENOMEM in call_transmit_status() Date: Thu, 7 Apr 2022 14:45:55 -0400 Message-Id: <20220407184601.1064640-2-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407184601.1064640-1-trondmy@kernel.org> References: <20220407184601.1064640-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. Fixes: 0472e4766049 ("SUNRPC: Convert socket page send code to use iov_iter()") 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