]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: act_skbedit: remove dependency on rtnl lock
authorVlad Buslov <vladbu@mellanox.com>
Mon, 3 Sep 2018 07:07:15 +0000 (10:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Sep 2018 17:17:35 +0000 (10:17 -0700)
commit9156aabd7d88a922ed9ac24be82f2857b20d4847
tree2534dd5676be1bc434a11101b462e44c131785f6
parentc7fd4ea3e6bcb7bb36e478b6a9f75fdd4cc13898
net: sched: act_skbedit: remove dependency on rtnl lock

According to the new locking rule, we have to take tcf_lock for both
->init() and ->dump(), as RTNL will be removed.

Use tcf lock to protect skbedit action struct private data from concurrent
modification in init and dump. 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)

Remove rtnl lock assertion that is no longer required.

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