]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: act_ife: remove dependency on rtnl lock
authorVlad Buslov <vladbu@mellanox.com>
Fri, 10 Aug 2018 17:51:44 +0000 (20:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 19:37:09 +0000 (12:37 -0700)
commit7b914c54a4342185fa13d051678f9f5a074c2d3a
tree03e04d7681af12a13845375d66b75948bdc95e85
parent66ff866b0068f6c42a93349619475e76f95561df
net: sched: act_ife: remove dependency on rtnl lock

Use tcf spinlock and rcu to protect params pointer from concurrent
modification during dump and init. Use rcu swap operation to reassign
params pointer under protection of tcf lock. (old params value is not used
by init, so there is no need of standalone rcu dereference step)

Ife action has meta-actions that are compiled as standalone modules. Rtnl
mutex must be released while loading a kernel module. In order to support
execution without rtnl mutex, propagate 'rtnl_held' argument to meta action
loading functions. When requesting meta action module, conditionally
release rtnl lock depending on 'rtnl_held' argument.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ife.c