[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7Na0BO=rQwFNy-M6pa=TfUXuMDiiwNzsevPpt5CUF=mqQ@mail.gmail.com>
Date: Thu, 26 Mar 2015 15:32:19 -0700
From: Cong Wang <cwang@...pensource.com>
To: Alexander Duyck <alexander.h.duyck@...hat.com>
Cc: Cong Wang <xiyou.wangcong@...il.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [Patch net-next] fib: move fib_rules_cleanup_ops() under rtnl lock
On Thu, Mar 26, 2015 at 3:17 PM, Alexander Duyck
<alexander.h.duyck@...hat.com> wrote:
>
> On 03/26/2015 02:55 PM, Cong Wang wrote:
>>
>> On Thu, Mar 26, 2015 at 2:47 PM, Alexander Duyck
>> <alexander.h.duyck@...hat.com> wrote:
>>>
>>>
>>> I kind of think the patch title is misleading. The code was already
>>> under
>>> an rtnl_lock, the problem was it was wrapped in the rules_mod_lock and
>>> that
>>
>>
>> I don't see callers like ipmr_rules_exit() holds a rtnl lock.
>
>
> It doesn't matter since ipmr is using a different set of fib_rules_ops. So
> for example it doesn't appear to implement a delete so all it is doing is
> dropping the rules. That is why fib_rules_cleanup_ops needs to stay within
> the rules_mod_lock.
Why ops->delete() matters here since ops->rules_list is generic?
Rules are added to or deleted from ops->rules_list with rtnl lock,
so why it is safe to clean up them all without rtnl lock?
On the other hand, the name rules_mod_lock already tells it is
just a protection for ops (module) register.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists