Skip to contentSkip to conversation

Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()"

PATCH Applied Vlad Buslov 3 participants 3 messages Aug 29, 2022 – Aug 31, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()"

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...".

---
 net/core/devlink.c | 2 --
 1 file changed, 2 deletions(-)
net/core/devlink.c +0 -2
index 2afbeb6eca67..0f7078db1280 100644
@@ -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;
Signature · 1 line
2.36.1
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Vlad Buslov

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...".

Quoted 5 lines
---
 net/core/devlink.c | 2 --
 1 file changed, 2 deletions(-)

Thanks,

#2 lore raw
In reply to Vlad Buslov
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html