]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: refactor police action helpers to require tcf_lock
authorVlad Buslov <vladbu@mellanox.com>
Mon, 17 Feb 2020 10:12:10 +0000 (12:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2020 22:17:02 +0000 (14:17 -0800)
commit1e03c1cfb957c712fdb7c4ebe9cb111a7c9e14a5
tree4f00ce35cc4daaebdcbd2819f91e1dc1d48c7775
parent39b07de3a6c44953ec4cc8a58298edbc6a4ffaaf
net: sched: refactor police action helpers to require tcf_lock

In order to remove rtnl lock dependency from flow_action representation
translator, change rcu_dereference_bh_rtnl() to rcu_dereference_protected()
in police action helpers that provide external access to rate and burst
values. This is safe to do because the functions are not called from
anywhere else outside flow_action infrastructure which was modified to
obtain tcf_lock when accessing action data in one of previous patches in
the series.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tc_act/tc_police.h