On Thu, Oct 26, 2017 at 6:58 AM, Paul E. McKenney <paul...@linux.vnet.ibm.com> wrote: > > So when removing an entire chain, you flush any queued workqueue handlers > to make sure that any operations using elements on that chain have also > completed, correct? This might also motivate the rcu_barrier() calls.
Yes, we can only free it after all pending RCU callbacks and works finish, because they are in the same chain and we are freeing the head of the chain in tcf_block_put(). > > Seems to me that your proposed patch is at least worth a try, then. > Thank you! Then it makes some basic sense. I did a quick test and don't see any crash or lockdep warning.