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: <1474549384.23058.94.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Thu, 22 Sep 2016 06:03:04 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] net: rtnl_register in net_ns_init need rtnl_lock

On Thu, 2016-09-22 at 13:03 +0200, Hannes Frederic Sowa wrote:
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
> ---
>  net/core/net_namespace.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> index 2c2eb1b629b11d..a2ace299f28355 100644
> --- a/net/core/net_namespace.c
> +++ b/net/core/net_namespace.c
> @@ -758,9 +758,11 @@ static int __init net_ns_init(void)
>  
>  	register_pernet_subsys(&net_ns_ops);
>  
> +	rtnl_lock();
>  	rtnl_register(PF_UNSPEC, RTM_NEWNSID, rtnl_net_newid, NULL, NULL);
>  	rtnl_register(PF_UNSPEC, RTM_GETNSID, rtnl_net_getid, rtnl_net_dumpid,
>  		      NULL);
> +	rtnl_unlock();
>  
>  	return 0;
>  }

Hi Hannes

Why is this needed here, and not in other places ?

Hint : A changelog always help reviewers and future bug hunting.

Thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ