[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fe1912d1-a047-8a23-bc66-b49c894a8ee9@arista.com>
Date: Tue, 26 Feb 2019 00:09:11 +0000
From: Dmitry Safonov <dima@...sta.com>
To: Eric Dumazet <eric.dumazet@...il.com>, linux-kernel@...r.kernel.org
Cc: 0x7f454c46@...il.com, "David S. Miller" <davem@...emloft.net>,
Florian Westphal <fw@...len.de>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
netdev@...r.kernel.org
Subject: Re: [PATCH] rtnetlink: Synchronze net in rtnl_unregister()
On 2/25/19 11:31 PM, Eric Dumazet wrote:
> On 02/25/2019 03:21 PM, Dmitry Safonov wrote:
>> Well, sure - but it seems confusing that rtnl_unregister() will require
>> synchronize_rcu(), while rtnl_unregister_all() will not.
>
> rtnl_unregister_all() is a different beast, since it removes the whole rtnl_msg_handlers[protocol]
>
> rtnl_unregister() only removes a subset, with different usages.
>
>> And I thought no one would care about another synchronize_rcu() in exit
>> path.
>
> We definitely care about things be done properly.
>
> If synchronize_rcu() is needed there, be it, but kfree_rcu() seems to be fine.
>
> In any case, I believe you need to more carefully explain what is the problem here,
> because I could not really see it.
Ugh, sorry - it seems that I haven't had enough coffee today.
I've read again rtnetlink_rcv_msg(), who is the only user of
rtnl_msg_handlers[] under read_lock, and it calls try_module_get(owner).
Sorry for the noise,
Dmitry
Powered by blists - more mailing lists