[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUqVx91g6aWTERXGnNo7BoD20Ac1wGsqMK-_Ejk-2c+DQ@mail.gmail.com>
Date: Tue, 18 Sep 2018 13:17:58 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()
On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai <ktkhai@...tuozzo.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.
Powered by blists - more mailing lists