* [PATCH net-next] net: dummy: do not acquire RTNL for too long
@ 2026-04-27 9:10 Eric Dumazet
2026-04-29 1:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2026-04-27 9:10 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet
Instead of holding RTNL for an arbitrary amount of time,
call register_netdev() for each dummy device created
at module loading time.
Tested:
modprobe dummy numdummies=10000
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
drivers/net/dummy.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index f8a4eb365c3d068399c7af9305785aea1a5a7aac..f6732eab5923f02d0164f2a47258b87740f8c593 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -158,7 +158,7 @@ static int __init dummy_init_one(void)
return -ENOMEM;
dev_dummy->rtnl_link_ops = &dummy_link_ops;
- err = register_netdevice(dev_dummy);
+ err = register_netdev(dev_dummy);
if (err < 0)
goto err;
return 0;
@@ -176,15 +176,11 @@ static int __init dummy_init_module(void)
if (err < 0)
return err;
- rtnl_net_lock(&init_net);
-
for (i = 0; i < numdummies && !err; i++) {
err = dummy_init_one();
cond_resched();
}
- rtnl_net_unlock(&init_net);
-
if (err < 0)
rtnl_link_unregister(&dummy_link_ops);
--
2.54.0.545.g6539524ca2-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: dummy: do not acquire RTNL for too long
2026-04-27 9:10 [PATCH net-next] net: dummy: do not acquire RTNL for too long Eric Dumazet
@ 2026-04-29 1:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-29 1:30 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, pabeni, horms, netdev, eric.dumazet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 27 Apr 2026 09:10:16 +0000 you wrote:
> Instead of holding RTNL for an arbitrary amount of time,
> call register_netdev() for each dummy device created
> at module loading time.
>
> Tested:
>
> modprobe dummy numdummies=10000
>
> [...]
Here is the summary with links:
- [net-next] net: dummy: do not acquire RTNL for too long
https://git.kernel.org/netdev/net-next/c/bed510e44095
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-29 1:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 9:10 [PATCH net-next] net: dummy: do not acquire RTNL for too long Eric Dumazet
2026-04-29 1:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox