* [PATCH net v2] net: failover: check register_netdevice_notifier() error in failover_init()
@ 2026-07-31 3:03 Minhong He
2026-08-05 2:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Minhong He @ 2026-07-31 3:03 UTC (permalink / raw)
To: Sridhar Samudrala, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, netdev
Cc: linux-kernel
failover_init() ignores register_netdevice_notifier() errors and always
returns success, which can leave the failover module loaded without its
netdev notifier registered.
Return the notifier registration result directly so module initialization
fails when registration fails.
Signed-off-by: Minhong He <heminhong@kylinos.cn>
---
v2:
- Return register_netdevice_notifier() directly
v1: https://lore.kernel.org/all/20260728031033.76431-1-heminhong@kylinos.cn/
net/core/failover.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/core/failover.c b/net/core/failover.c
index e43c59cd6868..4c3894a02cb7 100644
--- a/net/core/failover.c
+++ b/net/core/failover.c
@@ -302,9 +302,7 @@ EXPORT_SYMBOL_GPL(failover_unregister);
static __init int
failover_init(void)
{
- register_netdevice_notifier(&failover_notifier);
-
- return 0;
+ return register_netdevice_notifier(&failover_notifier);
}
module_init(failover_init);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v2] net: failover: check register_netdevice_notifier() error in failover_init()
2026-07-31 3:03 [PATCH net v2] net: failover: check register_netdevice_notifier() error in failover_init() Minhong He
@ 2026-08-05 2:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-05 2:00 UTC (permalink / raw)
To: Minhong He
Cc: sridhar.samudrala, davem, edumazet, kuba, pabeni, horms, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 31 Jul 2026 11:03:38 +0800 you wrote:
> failover_init() ignores register_netdevice_notifier() errors and always
> returns success, which can leave the failover module loaded without its
> netdev notifier registered.
>
> Return the notifier registration result directly so module initialization
> fails when registration fails.
>
> [...]
Here is the summary with links:
- [net,v2] net: failover: check register_netdevice_notifier() error in failover_init()
https://git.kernel.org/netdev/net-next/c/d13bb65dd2dd
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-08-05 2:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 3:03 [PATCH net v2] net: failover: check register_netdevice_notifier() error in failover_init() Minhong He
2026-08-05 2:00 ` 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