On Thu, Sep 8, 2016 at 6:18 AM, Hadar Hen Zion
<had...@dev.mellanox.co.il> wrote:
> On Wed, Sep 7, 2016 at 7:27 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote:
>> Also, ->cleanup() should be called with RTNL, no need to
>> take read lock here.
>
> RTNL lock isn't taken when cleanup is called.

Interesting... Then we have some problem here:

1) On the netns exit path, we only take the hashtable
spinlock while detaching it from hashtable, after
all refcnt is gone of course.

2) But, when we modify an existing action in hashtable,
we immediately release the refcnt before modifying it.

Fortunately the netns is refcnt'ed too, so this problem
doesn't show in real world.

If so, then you don't need read lock either, because
refcnt guarantees this call is only called by the last
process? IOW, there is no other possible parallel
writer??

Reply via email to