Thomas Graf wrote:
* jamal <1104467816.1049.181.camel@xxxxxxxxxxxxxxxx> 2004-12-30 23:36
Patrick pointed this in other email: the xchg is sort of defeated by the
else. Perhaps make the second one xchg as well.
Agreed, I changed it to:
struct tc_action *act;
act = xchg(&dst->action, src->action);
Am I missing something?
Yes, the xchg without locking is only right in case we don't have
an existing action that needs to be destroyed. Someone might still
be looking at the old action in a softirq. If you want to keep the
"lockless" variant, you need to call synchronize_net() before