Thread (8 messages) 8 messages, 3 authors, 2013-08-12

Re: locating the 'tc actions' hook

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2013-08-03 11:49:51


On 13-08-02 02:46 PM, John Fastabend wrote:
Perhaps another incorrect observation but what protects the tc_actions?

Create a series of actions via 'tc actions' which populates the hash
table protected by hinfo->lock and also rtnetlink is holding the rtnl
lock.

Add a filter with index hook to get this action graph attached to a
filters tcf_exts pointer.

Now for what I think is the race, the classifier will call tcf_exts_exec
which will call tcf_action_exec() and start walking the actions and
executing them with the qdisc_lock held.

At the same time tcf_action_destroy() may be called via 'tc actions
delete' which will only hold the rtnl lock via rtnetlink.
One runs in user context and the other in softirq context; so it will
work fine.

cheers,
jamal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help