diff options
author | Vlad Buslov <[email protected]> | 2018-07-05 17:24:26 +0300 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-07-08 12:42:28 +0900 |
commit | 3f7c72bc4227b169ba2c924a7987324e24bbc4b2 (patch) | |
tree | e7f4629275f0a29d10c25af239f9d4366435f1ec /lib/netdev-notifier-error-inject.c | |
parent | 789871bb2a0381425b106d2a995bde1460d35a34 (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 <[email protected]>
Signed-off-by: Vlad Buslov <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions