Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352927pxb; Mon, 20 Sep 2021 19:50:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3Gtrg8frBS/DnB9io2lhvqOMkSu0vUBn+bukYDUMsPwGRb+Rrk6Y890HCc1MbWJaP4Dm0 X-Received: by 2002:a92:c64a:: with SMTP id 10mr19522831ill.102.1632192635407; Mon, 20 Sep 2021 19:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192635; cv=none; d=google.com; s=arc-20160816; b=hpnuyOYs9yKgAdPhb306asu5DigcFbhBYw67atpgoNKOvmUKTbOdPuJ+FCJsxSJ+R3 VaYI0uDpBYlMNNXWmilRVYW8H0ji+LPNJM+7gdM4YgDKvzH2htrw+IsGCSlbz4a8b55+ hqL1wYQwUGc3KTkjbVtv7pPKNO0uMeiB00lgVyzMLUj9tuhhyc/XOvEjLohU1BH9qr9K QBJEYsCyveO7vwhNuhhWKSl2l+R8n3Ssy+8XYEWZjr95a/up0SvlyOD4TPlHidv7GbZz roxUhv8S8untgPRvKJuscfdbu6HzWvivm/sFDSjgRYgojdpouXrJBv3GCKOReRb0+63E 7FOw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P+trfFZPXcaAMBTluWqP0uNlMfy4lvm7Vc2FwBvBioI=; b=T/xt3ONRAOJeZ3MvJ2pFn1gRmBtqHe/o9zIOZVD+1cEQ8ke6a1Rpy7lhw6Ay+ikwj7 73Aj4ypkGfVMNGQ1B0zcpyd6AMNLXcfKQeMctGusrsgqbXwKn9jci1tesAlYNe3d3Jbl 7vIWZcwv3QKmGbZ1SoldTvPknndvtkOGmsaLe1oqvjHNHvZAikFFOJhdOzYyKq2ZkxfO /HgVxxzx163ST/8M/dHDXJTVrhwiFPg4k314X3Zuguk/4sfGkGJVTDsYP8op8ENhOrH5 0GLFePOC9Zk15qGIdCs7ETPTDMKACBv3gC8P2R653MzDJf42yfp3Is1/gglo1psyGrI7 1/1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mzjdNEET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k126si12379100iof.103.2021.09.20.19.50.23; Mon, 20 Sep 2021 19:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=mzjdNEET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382629AbhITSmL (ORCPT + 99 others); Mon, 20 Sep 2021 14:42:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:53128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381640AbhITSjB (ORCPT ); Mon, 20 Sep 2021 14:39:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 24F7D63326; Mon, 20 Sep 2021 17:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159020; bh=hjQw1FsWVyVIKSRoQkKjd5yOzPMsspegKkmUG41isls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzjdNEEToXcPB/NhuqOi152aAmdX0ItPO4MPvx8YElR9CikuD+pUG4/UfOuVXSWba +VYBu5sH8M9HZp6gpJbDdbVqsxe6iUJbw0zpraZlcyrx75l1eEFoevPU7a3Nqwqp/E KCYxIsz4d9893FBT1rWpiyNG31WSA0JqX4/g4CC4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eli Cohen , "David S. Miller" Subject: [PATCH 5.14 040/168] net/{mlx5|nfp|bnxt}: Remove unnecessary RTNL lock assert Date: Mon, 20 Sep 2021 18:42:58 +0200 Message-Id: <20210920163922.968661000@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eli Cohen commit 7c3a0a018e672a9723a79b128227272562300055 upstream. Remove the assert from the callback priv lookup function since it does not require RTNL lock and is already protected by flow_indr_block_lock. This will avoid warnings from being emitted to dmesg if the driver registers its callback after an ingress qdisc was created for a netdevice. The warnings started after the following patch was merged: commit 74fc4f828769 ("net: Fix offloading indirect devices dependency on qdisc order creation") Signed-off-by: Eli Cohen Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 3 --- drivers/net/ethernet/netronome/nfp/flower/offload.c | 3 --- 3 files changed, 9 deletions(-) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c @@ -1870,9 +1870,6 @@ bnxt_tc_indr_block_cb_lookup(struct bnxt { struct bnxt_flower_indr_block_cb_priv *cb_priv; - /* All callback list access should be protected by RTNL. */ - ASSERT_RTNL(); - list_for_each_entry(cb_priv, &bp->tc_indr_block_list, list) if (cb_priv->tunnel_netdev == netdev) return cb_priv; --- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c @@ -300,9 +300,6 @@ mlx5e_rep_indr_block_priv_lookup(struct { struct mlx5e_rep_indr_block_priv *cb_priv; - /* All callback list access should be protected by RTNL. */ - ASSERT_RTNL(); - list_for_each_entry(cb_priv, &rpriv->uplink_priv.tc_indr_block_priv_list, list) --- a/drivers/net/ethernet/netronome/nfp/flower/offload.c +++ b/drivers/net/ethernet/netronome/nfp/flower/offload.c @@ -1766,9 +1766,6 @@ nfp_flower_indr_block_cb_priv_lookup(str struct nfp_flower_indr_block_cb_priv *cb_priv; struct nfp_flower_priv *priv = app->priv; - /* All callback list access should be protected by RTNL. */ - ASSERT_RTNL(); - list_for_each_entry(cb_priv, &priv->indr_block_cb_priv, list) if (cb_priv->netdev == netdev) return cb_priv;