path: root/net/sched/act_tunnel_key.c
diff options
authorVlad Buslov <vladbu@mellanox.com>2018-07-05 17:24:26 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-08 12:42:28 +0900
commit3f7c72bc4227b169ba2c924a7987324e24bbc4b2 (patch)
treee7f4629275f0a29d10c25af239f9d4366435f1ec /net/sched/act_tunnel_key.c
parentnet: sched: implement unlocked action init API (diff)
net: sched: always take reference to action
Without rtnl lock protection it is no longer safe to use pointer to tc action without holding reference to it. (it can be destroyed concurrently) Remove unsafe action idr lookup function. Instead of it, implement safe tcf idr check function that atomically looks up action in idr and increments its reference and bind counters. Implement both action search and check using new safe function Reference taken by idr check is temporal and should not be accounted by userspace clients (both logically and to preserver current API behavior). Subtract temporal reference when dumping action to userspace using existing tca_get_fill function arguments. Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions