Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1583210pxf; Fri, 12 Mar 2021 13:20:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0zr1l9e+CNRwCbS4YCMkPQLp47EBKpZxrd9bbzrAjqxBlraXnoygeNHcqFXoHO60bk4c3 X-Received: by 2002:a17:906:8546:: with SMTP id h6mr10558348ejy.23.1615584027652; Fri, 12 Mar 2021 13:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615584027; cv=none; d=google.com; s=arc-20160816; b=ps5BUZmH1liDb6xnFaBO1wpYkCj3kWfezJ1HodhjKE9DMD1QL56A7s0RI/cuLXiQdZ bexiPqtWnArsAmd2ijM2U9gQJkOkWKs6kDvRCTe3wUIDw45nMW0ana0y4mGmDhPA+RJO rfyfzRgHzXT5XtCaXiI0RvrvoFzJYJwtsIunn5/F6WUnAGMozY5hfcZYuCNLYZhdwmAU dYMwt1RN4nDUVkfKJfuZcj3xuHaB/QqARrOnzBNRGWRnQn06qL+vTAwMIJpjz1PU+Ln9 BLt+ZrPyHglveX+KYqUAnl2ku3H2WmtohZ+GrHnje12bmi7jvnyAWoD+NAQ3HGTdR1sq SqLQ== 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=FxeqY0lbRXBBNFSL0hGXRSL8HmbSfYX5sIzVJ3Lknl0=; b=aijUUkEmWh7oIxZX9G4u8JaZGD1ZAYDA7dElCdjSuyFc00SzXXjdM5nXkPetxSuPNN 4D6vzn+zdcz2qFqxAcFhWDIKRelS41yrqnEZAEilhogJSBksnWUr9WBOl8Y3POao4Hch FOvda4buyReA1G6SN32EaMpz1siAAzy10YoufgwFdxXmwRsiopMGvWAHa0cqyWYWwI0w d6T39Vpb14F0GLLgf3yoWGlSxGgV6Jfu9/GrGi9hhLrdkiV+vuTeYQGz8Sb5X4erdYLK ++BQ3CxyTt+Ef6WEMGNlgIAa1jckQXtMZxwEsGnlyPGFnSs7jJULDea0DGKwFLgx0QGm quwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DIKfVXYU; 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 h19si4832572edb.134.2021.03.12.13.20.05; Fri, 12 Mar 2021 13:20:27 -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=DIKfVXYU; 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 S235194AbhCLVS4 (ORCPT + 99 others); Fri, 12 Mar 2021 16:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235196AbhCLVSe (ORCPT ); Fri, 12 Mar 2021 16:18:34 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4C46C061574 for ; Fri, 12 Mar 2021 13:18:32 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id 130so25821225qkh.11 for ; Fri, 12 Mar 2021 13:18:32 -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=FxeqY0lbRXBBNFSL0hGXRSL8HmbSfYX5sIzVJ3Lknl0=; b=DIKfVXYUUlX0L8Du8/KwHTAzCJMzKuTp7rsxQwPXdB62WcS+Ljqlf+7M1gDcGhzMdu xE1VmlHUVCkWLKJl+pm5BldobYsflq/uaI9iTU5DJM5NylYRz8A32lHDwTvIUVzOvQQ1 QFY/HjFbT6mkKu22deR5bo4zsCwbrhoi58CPAWJ6zxzlWFmruANREIvQoqyaZx+FTHbi VKHKLQVW4zXylvyXxcruI6xs3lwsjBNgpUgZUZrE7pBdEsTFpCYufR8E5EspGPYdTQsp c7qb6My8fmK/NVPI01bvRGjmy7Q2GQBwojZPC1pKx/imFLxeZI65oXm7W0d3Qs5EZFE8 IBGQ== 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=FxeqY0lbRXBBNFSL0hGXRSL8HmbSfYX5sIzVJ3Lknl0=; b=EUDsx6yJ7l1XMuAUL96cIk1MGDECwWpbZNX4rhdqdwWQNeEQf9NASo04Qm69uyqj16 O/kJm7FVa/2PKSOisfxO6g/hjRJGB6YfUC8rvE+fKHvjYIplBP6l66YEIynVKBNOV22G oRT/pDx9EWwZVQ7d+eeQw4Wjkpyv79uSOPXsL7frrn2/EGNtNmSVMWQSirw2kaH2P/rF 053KGzkVxkX4ZrKOTBHJx3xHR1U2d1B3WgES645uCQX2oOm3zK4odaXEOS4D73AqUwqu aFL/qNJc86jpFg6rC1geqAkjCeSKcJGD1HQNOGptBXvFNXYNTFHjaEo7fMYFoMYOycEw xbLg== X-Gm-Message-State: AOAM533fuJhJX4+ieMkqc2gqE+Jo5yNP2KFpse6s0DUJw05BKNt4Rnkq +OEQoifCwMUHv1/L4Ojc17LTkx0I0LKD9Q== X-Received: by 2002:a37:40d5:: with SMTP id n204mr6611748qka.79.1615583911835; Fri, 12 Mar 2021 13:18:31 -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 d24sm5177490qko.54.2021.03.12.13.18.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 13:18:31 -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 v3 4/5] sunrpc: Prepare xs_connect() for taking NULL tasks Date: Fri, 12 Mar 2021 16:18:25 -0500 Message-Id: <20210312211826.360959-5-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312211826.360959-1-Anna.Schumaker@Netapp.com> References: <20210312211826.360959-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 --- v3: Clean up WARN_ON_ONCE() to avoid a new if --- net/sunrpc/xprtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index e35760f238a4..eb8df10aac9c 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2310,7 +2310,7 @@ 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)); + WARN_ON_ONCE(task && !xprt_lock_connect(xprt, task, transport)); if (transport->sock != NULL) { dprintk("RPC: xs_connect delayed xprt %p for %lu " -- 2.29.2