On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai <ktk...@virtuozzo.com> 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
> in the future, we will have a problem during a fail of net initialization.
>
> Say,
>
> setup_net():
>         ipmr_net_ops->init() returns 0
>         xxx->init()          returns error
> and then we do:
>         ipmr_net_ops->exit(),
>
> which could touch ra_mutex (theoretically).

How could ra_mutex be touched in this scenario?

ra_mutex is only used in ip_ra_control() which is called
only by {get,set}sockopt(). I don't see anything related
to netns exit() path here.

Reply via email to