lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250402091844.GI214849@horms.kernel.org>
Date: Wed, 2 Apr 2025 10:18:44 +0100
From: Simon Horman <horms@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] rtnetlink: Use register_pernet_subsys() in
 rtnl_net_debug_init().

On Tue, Apr 01, 2025 at 12:07:08PM -0700, Kuniyuki Iwashima wrote:
> rtnl_net_debug_init() registers rtnl_net_debug_net_ops by
> register_pernet_device() but calls unregister_pernet_subsys()
> in case register_netdevice_notifier() fails.
> 
> It corrupts pernet_list because first_device is updated in
> register_pernet_device() but not unregister_pernet_subsys().
> 
> Let's fix it by calling register_pernet_subsys() instead.
> 
> The _subsys() one fits better for the use case because it keeps
> the notifier alive until default_device_exit_net(), giving it
> more chance to test NETDEV_UNREGISTER.
> 
> Fixes: 03fa53485659 ("rtnetlink: Add ASSERT_RTNL_NET() placeholder for netdev notifier.")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> v2: Correct changelog
> v1: https://lore.kernel.org/netdev/20250328220453.97138-1-kuniyu@amazon.com/

Thanks for the update.

Reviewed-by: Simon Horman <horms@...nel.org>

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ