Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-20 Thread Cong Wang
On Thu, Sep 20, 2018 at 2:04 AM Kirill Tkhai wrote: > > On 20.09.2018 0:28, Cong Wang wrote: > You added me to CC, so you probably want to know my opinion about this. > Since it's not a real problem fix, but just a refactoring, I say you > my opinion, how this refactoring may be made better. If yo

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-20 Thread Kirill Tkhai
On 20.09.2018 0:28, Cong Wang wrote: > On Wed, Sep 19, 2018 at 1:25 AM Kirill Tkhai wrote: >> >> On 18.09.2018 23:17, Cong Wang wrote: >>> On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote: In inet_init() the order of registration is: ip_mr_init(); init_inet_

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-19 Thread Cong Wang
On Wed, Sep 19, 2018 at 1:25 AM Kirill Tkhai wrote: > > On 18.09.2018 23:17, Cong Wang wrote: > > On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote: > >> In inet_init() the order of registration is: > >> > >> ip_mr_init(); > >> init_inet_pernet_ops(); > >> > >> This means, ipmr_

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-19 Thread Kirill Tkhai
On 18.09.2018 23:17, Cong Wang wrote: > On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote: >> In inet_init() the order of registration is: >> >> ip_mr_init(); >> init_inet_pernet_ops(); >> >> This means, ipmr_net_ops pernet operations are before af_inet_ops >> in pernet_list. So,

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-18 Thread Cong Wang
On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote: > In inet_init() the order of registration is: > > ip_mr_init(); > init_inet_pernet_ops(); > > This means, ipmr_net_ops pernet operations are before af_inet_ops > in pernet_list. So, there is a theoretical probability, sometimes

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-17 Thread David Miller
From: Cong Wang Date: Fri, 14 Sep 2018 13:32:42 -0700 > ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, > but its initialization is in the generic netns code, setup_net(). > > Move it to IPv4 specific net init code, inet_init_net(). > > Fixes: d9ff3049739e ("net: Replace ip_r

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-17 Thread Kirill Tkhai
On 14.09.2018 23:32, Cong Wang wrote: > ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, > but its initialization is in the generic netns code, setup_net(). > > Move it to IPv4 specific net init code, inet_init_net(). > > Fixes: d9ff3049739e ("net: Replace ip_ra_lock with per-ne

[Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-14 Thread Cong Wang
ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, but its initialization is in the generic netns code, setup_net(). Move it to IPv4 specific net init code, inet_init_net(). Fixes: d9ff3049739e ("net: Replace ip_ra_lock with per-net mutex") Cc: Kirill Tkhai Signed-off-by: Cong Wa