From patchwork Mon Dec 11 13:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vacek X-Patchwork-Id: 13487209 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tk+7Pe4T" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD70FC5 for ; Mon, 11 Dec 2023 05:12:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702300321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bxkpf05We2DBfBoO7M+TMnamc353LQSiQtx/2gTu6dc=; b=Tk+7Pe4TBkKAHBBl2ZrNWxfB6A3GjtXWheOnISFh4O1DQi7Hv8DUCpH4QCg0ekBrA8LNpz l0yPXJzPxFiLixGC+udIrpeqfY8o6xxuc4LwWKS8MjcjmDlkdSFSof2HfuB8J227djhF4n n70FPoRNt+ieKVpJ6r353hsA/+G1nlQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-471-rpkuKG-9P4uvbNB6RUNR3w-1; Mon, 11 Dec 2023 08:11:55 -0500 X-MC-Unique: rpkuKG-9P4uvbNB6RUNR3w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 487C31C068C2; Mon, 11 Dec 2023 13:11:55 +0000 (UTC) Received: from metal.redhat.com (unknown [10.45.224.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id E897340C6EB9; Mon, 11 Dec 2023 13:11:53 +0000 (UTC) From: Daniel Vacek To: Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Vacek Subject: [PATCH] IB/ipoib: No need to hold the lock while printing the warning Date: Mon, 11 Dec 2023 14:10:50 +0100 Message-ID: <20231211131051.1500834-1-neelx@redhat.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 Signed-off-by: Daniel Vacek --- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 5b3154503bf4..ae2c05806dcc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -536,17 +536,17 @@ static int ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast) multicast = ib_sa_join_multicast(&ipoib_sa_client, priv->ca, priv->port, &rec, comp_mask, GFP_KERNEL, ipoib_mcast_join_complete, mcast); - spin_lock_irq(&priv->lock); if (IS_ERR(multicast)) { ret = PTR_ERR(multicast); ipoib_warn(priv, "ib_sa_join_multicast failed, status %d\n", ret); + spin_lock_irq(&priv->lock); /* Requeue this join task with a backoff delay */ __ipoib_mcast_schedule_join_thread(priv, mcast, 1); clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); spin_unlock_irq(&priv->lock); complete(&mcast->done); - spin_lock_irq(&priv->lock); } + spin_lock_irq(&priv->lock); return 0; }