Re: [PATCH] ipv6: delay procfs initialization after the ipv6 structs are ready

From: Jakub Kicinski
Date: Wed Mar 20 2024 - 23:39:50 EST


On Wed, 20 Mar 2024 18:17:36 +0100 Nicolas Cavallari wrote:
> procfs files are created before the structure they reference are
> initialized. For example, if6_proc_init() creates procfs files that
> access structures initialized by addrconf_init().
>
> If ipv6 is compiled as a module and a program manages to open an ipv6
> procfs file during the loading of the module, it can oops the kernel.
>
> It appears that we were unlucky enough to reproduce this problem
> multiple times already, out of maybe 100 boots:

I haven't investigated too closely but looks like this breaks
all selftests. Please run all net/forwarding selftests before
posting v2?