Thread (56 messages) flat view 56 messages, 6 authors, 2019-08-27

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

From: Vlad Buslov <hidden>
Date: 2019-08-26 10:11:56

On Sun 25 Aug 2019 at 21:32, Cong Wang [off-list ref] wrote:
On Wed, Aug 21, 2019 at 11:27 AM Vlad Buslov [off-list ref] wrote:
quoted
At first I was confused why you bring up rtnl lock in commit message
(flower classifier has 'unlocked' flag set and can't rely on it anymore)
but looking at the code I see that we lost rcu read lock here in commit
d39d714969cd ("idr: introduce idr_for_each_entry_continue_ul()") and you
are correctly bringing it back. Adding Cong to advise if it is okay to
wait for this patch to be accepted or we need to proceed with fixing the
missing RCU lock as a standalone patch.
Hmm? Isn't ->walk() still called with RTNL lock? tcf_chain_dump()
calls __tcf_get_next_proto() which asserts RTNL.

So why does it still need RCU read lock when having RTNL?
Individual filters can be deleted without obtaining rtnl lock. And
without rcu read lock, f can be deallocated in fl_walk() main loop
before refcount_inc_not_zero() obtains reference to it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help