Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp51647pxh; Thu, 7 Apr 2022 13:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVhL4D/tHwjb1roaDhV5GC257SYFmEgiZmG6wJmSzIDeixGO1jqtUXmDr1doXMnQBZoUv4 X-Received: by 2002:a17:90a:b903:b0:1ca:be37:1d41 with SMTP id p3-20020a17090ab90300b001cabe371d41mr18065843pjr.9.1649364112389; Thu, 07 Apr 2022 13:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649364112; cv=none; d=google.com; s=arc-20160816; b=tR18NJm8VyEvpL7pIMn/Ub2bbsgma5E9egvsvAqWUO6R1o5BXY8FubTAqIQTzwlqu8 eqHCMAIEqFslk0OU6xb4PiVWS9Upo3qRCaAhISlgefDhE6es1gJU8Enp47q4MqYI6L86 uPsHkbJko2TPs/Ax6U6dswGFglUCFHcXpYY3CycUheCmBXb3mPz1c7PT6er2JK970urT T+BWQg11pEnI51OV5sk5CiH/3zfnE2X6uDNiyetArmskLoAuN/7CIgArjBa8PBIZ4z4D zE19Ugu67lwC6vzex1bcEjW5FG5lpSYkK8D3NbvpbcfxGaByXjB9TlPdwvU0IwgOPsmy GYOQ== 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=jOhl+6dW8ejOdg8vXn/GQIq1VRxBS64bZSkZey1jpts=; b=IgzqH7hOn3M4DOZ7aHzCpB//pPeB+RpgbvzGnVF86FNAIuVoSHr44r8m+ByTxYGHz9 YFu0akBHhb8JfsmFxiV3XsBibKGwapBs0DDaVaF/ExZBjxQIciarMyUtmdVCBhPcvamU LTnBHu5+5fcR6r6yKwF4IZfzKISQO0NRln5oE5skYsVzjK02Q2dy9ZLkNmXZmA9KeE4s kif7SFLz30/iPO0uepAbsVEIBC+sNJto9LaxzjAxRsXlDOXG+n8BZoLOT2lu+pwMkvZK Vu1DKExajkK+Q45cXufwrgLHUAsC7HZM0l0EmBMkQy/7jndzoQfxoBzeC6EcjfCBjWSN IoEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oz6nSMkc; 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 b12-20020a056a000ccc00b004fa687c28d4si21681574pfv.86.2022.04.07.13.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:41:52 -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=Oz6nSMkc; 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 3EC9B2742B1; Thu, 7 Apr 2022 12:52:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233488AbiDGSy2 (ORCPT + 99 others); Thu, 7 Apr 2022 14:54:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347003AbiDGSy1 (ORCPT ); Thu, 7 Apr 2022 14:54:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C007194832 for ; Thu, 7 Apr 2022 11:52:27 -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 B404961DD2 for ; Thu, 7 Apr 2022 18:52:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E83D2C385A0 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=1649357546; bh=v1GKfdZJkhBCnWe0zT+yWOMIjvsz805Rs3wLq8CE51M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Oz6nSMkcqvTFaSYb0Z9iE+P4QtRGDKRlMuUQs7Xn8gma4h7ECbGPz3GR9yif5nxMQ 6YnMd37wZmRdXlZmZY9AnkPtmVrJoJStxSiVc7ATCr8q/PbqbUyqwlS8e/NSQQoJJm +weJSVZBLxx5oeGg6THNYcHVUaJfB6HmLSBoM6/L+aBx1kQHKHzlkc5WBt88vbVFug aINYlfn5GIpkPbGDImr7L01I5w0FchHikuBJwYN9BpfnG8beKrfpWwDyosS3LTeeKW S3b5jIDbqfQimsTo6Xr+HROiNNjVoNzdJbSUdnxetfSONvC4iM4bGpxnVDkzVC522S wH5MUcVQniygg== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v2 3/8] SUNRPC: Handle low memory situations in call_status() Date: Thu, 7 Apr 2022 14:45:56 -0400 Message-Id: <20220407184601.1064640-3-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407184601.1064640-2-trondmy@kernel.org> References: <20220407184601.1064640-1-trondmy@kernel.org> <20220407184601.1064640-2-trondmy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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. Fixes: b61d59fffd3e ("SUNRPC: xs_tcp_connect_worker{4,6}: merge common code") 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