diff mbox series

[net-next] Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()"

Message ID 20220829121324.3980376-1-vladbu@nvidia.com (mailing list archive)
State Accepted
Commit 21cb860c7f314be471d2dbcbfb659af405750500
Delegated to: Netdev Maintainers
Headers show
Series [net-next] Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()" | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 2 maintainers not CCed: edumazet@google.com pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 5 this patch: 5
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Vlad Buslov Aug. 29, 2022, 12:13 p.m. UTC
This reverts commit 6005a8aecee8afeba826295321a612ab485c230e.

The assertion was intentionally removed in commit 043b8413e8c0 ("net:
devlink: remove redundant rtnl lock assert") and, contrary what is
described in the commit message, the comment reflects that: "Caller must
hold RTNL mutex or reference to dev...".

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 net/core/devlink.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Leon Romanovsky Aug. 29, 2022, 12:18 p.m. UTC | #1
On Mon, Aug 29, 2022 at 02:13:24PM +0200, Vlad Buslov wrote:
> This reverts commit 6005a8aecee8afeba826295321a612ab485c230e.
> 
> The assertion was intentionally removed in commit 043b8413e8c0 ("net:
> devlink: remove redundant rtnl lock assert") and, contrary what is
> described in the commit message, the comment reflects that: "Caller must
> hold RTNL mutex or reference to dev...".
> 
> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
> ---
>  net/core/devlink.c | 2 --
>  1 file changed, 2 deletions(-)
> 

Thanks,
Tested-by: Leon Romanovsky <leonro@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Aug. 31, 2022, 6:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 29 Aug 2022 14:13:24 +0200 you wrote:
> This reverts commit 6005a8aecee8afeba826295321a612ab485c230e.
> 
> The assertion was intentionally removed in commit 043b8413e8c0 ("net:
> devlink: remove redundant rtnl lock assert") and, contrary what is
> described in the commit message, the comment reflects that: "Caller must
> hold RTNL mutex or reference to dev...".
> 
> [...]

Here is the summary with links:
  - [net-next] Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()"
    https://git.kernel.org/netdev/net-next/c/21cb860c7f31

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/core/devlink.c b/net/core/devlink.c
index 2afbeb6eca67..0f7078db1280 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -12505,8 +12505,6 @@  int devlink_compat_switch_id_get(struct net_device *dev,
 	 * devlink_port instance cannot disappear in the middle. No need to take
 	 * any devlink lock as only permanent values are accessed.
 	 */
-	ASSERT_RTNL();
-
 	devlink_port = netdev_to_devlink_port(dev);
 	if (!devlink_port || !devlink_port->switch_port)
 		return -EOPNOTSUPP;