Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp526278pxb; Tue, 2 Feb 2021 10:48:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZdhh2CyKmS2mxaXgKVdS6BZeAXckwd9qFX6/aj3JB4hWev1h+97erKgHhVPndd7vnHL1W X-Received: by 2002:a17:906:39d0:: with SMTP id i16mr23770484eje.18.1612291737362; Tue, 02 Feb 2021 10:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612291737; cv=none; d=google.com; s=arc-20160816; b=RkFcKGAgS+kWfHbN43EN08q1vhrzQXDTvt51tCcyY/6fQo+rdTPQ5CA7jwKdUxnaPt /v3OTKl6vLLIoc8HysDe4m+4L1HFTfOe0rz7hWKo0rVAmzrt4Lifx79Xk0jye24apGyA t/pX1SCkUSUJlwmxlJgNBpwArz6Ov3fn4i9MjoUn99CLb5MXn8B6S4H96Ep3k9r3acP3 Yz+x9WPWmb08Qpymv/GY7a7zrGXHEbqjNwxcuo6Kud3JBvDiacioZSWaJI1vmuTrr+98 U9Un+6UqIfvbG0z9mArSsR1cUXk/JZceuDDUq88fWqU6ofmQ3ItQHn/D+nRUS8HuoTml Nkdw== 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:cc:to:from:sender :dkim-signature; bh=SW9sK2N6g/Ta8eXWJeE/yuBYQzAt4OFHO0Wdl6GzXf4=; b=nk6qi3MKe+X7gjEQyPeENJ340g54v/onsx1SaQrBZBJc9mc0OvWenAI9r39Hqul7jI uLgSu5uMFjCynQZ05AMvfYWRPjvkOyzxjFJWy5wcaruKRhtdA35KxGLTyqrEG+3fC0WN SGNjfwHO1dusAaP06OdknHiGJI32e2Vahfvj461/eHuv6JRz2e3nTUeBoNP3auREL0UE BGs2/0aP/H9KMQ0QQyqESTAzMWw7l4NQzGVyoTX/b5oWVzq8utgDYs8nJDJ1HC8lEQZk hvpEHWb6wFEgKBvd32Qfr4BFxfCkHGmKjW4hgg4f2gb8VEYZMmqbz/fuq/ADYN2OB7Dq CVzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z0n6cm6R; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si13350391ejb.223.2021.02.02.10.48.33; Tue, 02 Feb 2021 10:48:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z0n6cm6R; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238922AbhBBSpG (ORCPT + 99 others); Tue, 2 Feb 2021 13:45:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238884AbhBBSnd (ORCPT ); Tue, 2 Feb 2021 13:43:33 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8B07C06178C for ; Tue, 2 Feb 2021 10:42:51 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id c1so15728548qtc.1 for ; Tue, 02 Feb 2021 10:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SW9sK2N6g/Ta8eXWJeE/yuBYQzAt4OFHO0Wdl6GzXf4=; b=Z0n6cm6RGORANB+uPMJVaqhKT7lNKEZI84TzlWz40f9cyfMSBdR4Vp1NOXtIVZFFXI fJG2ytMI0yfcJc6hCn8yJCiD1pqems3K/o1W9ngHDJEEr/g6CghQR9zRxkp4MM4O4hVK /4Z7s2K+bFo0Vged3xpdfEzcne3o5ed/rGYKNmwBqV0+Bd/YGiYXx5/bHZdZ2CugFV2E REvRQ+mVjHHJ8Y1QklzqTh2FGfwX1xmwNjaBLEqsob+JNdU6RevGYZNCG0mGfA6s81b6 k+gsTtiBkr+bOWLETO28dSKbcdHOcwwLNcgms5iepYZlYLEW/tEJVAUGNbtZzxF+eif5 wuZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SW9sK2N6g/Ta8eXWJeE/yuBYQzAt4OFHO0Wdl6GzXf4=; b=cK0OHda0PKTA3nNaf4x847DBtEXvLKu/GFJU9MMDEgiES9qBHCJJlHHdeS/p477ZoL qZs31drtLcBV9DAsA74Z/yXzKHmVc+Jl0AbQH20sq9nZGltKc5YRi1OPDMiE514Yg6sJ +5CdK1UwQ4EX4P4BUt+aLbQPgmozuMz60+4OUkSVRc93ci6Mrf6lvVQ9teBp8W4mMib1 YeOY58dyfNHun2lDZ3S3LzatNMDpnGUaNaPn4rDqQ0n7Zur8dcWHptj4WpvzC4YS9EN1 ZSIkD0egksrees9A2zmR26MVDXJkYPzQPUGx36Q8CYDcXgF+9xiE/8K0/g7G1OS1aQJv vPkg== X-Gm-Message-State: AOAM5300H4WuCYGvTsu5tNG3rYNC2GZwzQq427ZdtxmR70T1/M/j3J/p O6ZHTHP5yd8ZMDcbM4BcPQgm7xCU91AR7g== X-Received: by 2002:ac8:7c95:: with SMTP id y21mr21743576qtv.199.1612291370907; Tue, 02 Feb 2021 10:42:50 -0800 (PST) Received: from gouda.nowheycreamery.com (c-68-32-74-190.hsd1.mi.comcast.net. [68.32.74.190]) by smtp.gmail.com with ESMTPSA id k4sm7415906qtq.13.2021.02.02.10.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 10:42:50 -0800 (PST) Sender: Anna Schumaker From: schumaker.anna@gmail.com X-Google-Original-From: Anna.Schumaker@Netapp.com To: linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH v2 4/5] sunrpc: Prepare xs_connect() for taking NULL tasks Date: Tue, 2 Feb 2021 13:42:43 -0500 Message-Id: <20210202184244.288898-5-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202184244.288898-1-Anna.Schumaker@Netapp.com> References: <20210202184244.288898-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Anna Schumaker We won't have a task structure when we go to change IP addresses, so check for one before calling the WARN_ON() to avoid crashing. Signed-off-by: Anna Schumaker --- net/sunrpc/xprtsock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index c56a66cdf4ac..250abf1aa018 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2311,7 +2311,8 @@ static void xs_connect(struct rpc_xprt *xprt, struct rpc_task *task) struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); unsigned long delay = 0; - WARN_ON_ONCE(!xprt_lock_connect(xprt, task, transport)); + if (task) + WARN_ON_ONCE(!xprt_lock_connect(xprt, task, transport)); if (transport->sock != NULL) { dprintk("RPC: xs_connect delayed xprt %p for %lu " -- 2.29.2