Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp35586pxh; Thu, 7 Apr 2022 13:11:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDmkgsNk8kFy1eb5TEmuJNR0GNsaUSsJp7YQ3/082LqO7d5psQDTocJNkATE/Zwj/EATxw X-Received: by 2002:a63:9dc6:0:b0:398:6e02:c105 with SMTP id i189-20020a639dc6000000b003986e02c105mr12788152pgd.495.1649362291039; Thu, 07 Apr 2022 13:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649362291; cv=none; d=google.com; s=arc-20160816; b=NXnWZwoJDBiu8P3HhnZ8GEuUwUdyBdR/BX3p3Pc8BkM3GCrG//qMOzjmA+DN2ItmRZ p9Px9ya/lYvMligH5jN9cfldtabyzBnIDlj9RJDdTnCnKZ33/6hvHMbDbKC7yoxym0h/ L0ZCqsknEHrV1x2IvUpfPBF+NgLXTF23cVgKiwzmwchRdwV2Sgk+DVk6eacjMvARBKD5 TBPzhfRp9wL2RmTzxxM6Q0hwtRYlpe4c2CIc/vRjKK5KOJ+c5cH6fYnaoTz/8DxwvTxa 4BWYoBFlZJejZoHvzsEAWIa4Mf2eH6Ln4N+qFdqSYJwJjkA3NeMRoDfMhyB2Db4LIQpF JhnQ== 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=aNPbCf9wSi9QAcsbxvRf4zzo1AiB2CjTmZfLpkd4SVQ=; b=jMZnSQYpaoAkkZVW49X5jEYXE1OFZDnWrqcETNOTwPXXngBjVcWJm4Sr6EQacHJKBg dE+K3CNFLe1kVfUkeOqr/+cBMcDpgikrtIpdxZxoB2ZzVmv8DbFD2dGG7vc4nd3k4GiV DSDco41w1KmUsOwvCG6iq+UHYKgm9bRqSivVyKW9svaOJArbgVDXicqns2KxRqMe+t8R Qjx3YlLa4EHzAtHfi0wHtDyIDQAPXnuzND5nkE5NgBSFPwhvSNvffhoeS/WkNL11kiMz 2P9P/ntQuhmxkZRh1AI1Q1MR7GrTP4s041AHB4sb3pJE6SWumYRalMUnIAPflxsqG6eV kh/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GvqorTkL; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h10-20020a056a00230a00b004faec974df6si3117711pfh.30.2022.04.07.13.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:11:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GvqorTkL; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 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 3A7BE2CA840; Thu, 7 Apr 2022 12:33:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345101AbiDGPq7 (ORCPT + 99 others); Thu, 7 Apr 2022 11:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345135AbiDGPqr (ORCPT ); Thu, 7 Apr 2022 11:46: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 7454DC6F1C for ; Thu, 7 Apr 2022 08:44:35 -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 B8734B826CB for ; Thu, 7 Apr 2022 15:44:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1328AC385BB 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=1649346272; bh=geHWlCNz2of9qKMfCACUjEJei7ZoXiDns4tDKdJ9Pk8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GvqorTkLiyL3RSdIdgZOd39vEcFXGf0UeKg0i0YrtPIykJBxfwPEW6NEZ7no64HLz 8PUF2Kc/tAB8/Dw6LVhqDjlJ3f0/RBPDD2SN/zuW06wuixbTEsGOIf4MmnZGR2FD6k rpEXoqcbTsmlf08Gif7Hzt6CiksfFSmpxsk+EExpwCPQ1HOCwKAToS8bdPQay0XSZ6 8eMgM8T8dLXqPdQrYcTzaklHXbTQErq/jzmXzLcqxhApeH6GmotV9H2y4Xha8pWW9Y g5f2nBPsMz2pDGA9dyanSDdAgbASvninOM2i+rembs9NAIwt4g8gvmrRevB7AyRCx9 g8oExaWDbTPzQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 3/7] SUNRPC: Handle low memory situations in call_status() Date: Thu, 7 Apr 2022 11:38:05 -0400 Message-Id: <20220407153809.1053261-3-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407153809.1053261-2-trondmy@kernel.org> References: <20220407153809.1053261-1-trondmy@kernel.org> <20220407153809.1053261-2-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 We need to handle ENFILE, ENOBUFS, and ENOMEM, because xprt_wake_pending_tasks() can be called with any one of these due to socket creation failures. Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 07328f1d3885..6757b0fa5367 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2367,6 +2367,11 @@ call_status(struct rpc_task *task) case -EPIPE: case -EAGAIN: break; + case -ENFILE: + case -ENOBUFS: + case -ENOMEM: + rpc_delay(task, HZ>>2); + break; case -EIO: /* shutdown or soft timeout */ goto out_exit; -- 2.35.1