aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-02-11 10:55:37 +0200
committerDavid S. Miller <davem@davemloft.net>2019-02-12 13:41:32 -0500
commita5654820bb4b1f5f21eb83b8fb9de79ce1382d2b (patch)
tree2d297adc23f02d83091414deb0defe56b903372a /include/net/sch_generic.h
parentnet: sched: traverse chains in block with tcf_get_next_chain() (diff)
downloadlinux-dev-a5654820bb4b1f5f21eb83b8fb9de79ce1382d2b.tar.xz
linux-dev-a5654820bb4b1f5f21eb83b8fb9de79ce1382d2b.zip
net: sched: protect chain template accesses with block lock
When cls API is called without protection of rtnl lock, parallel modification of chain is possible, which means that chain template can be changed concurrently in certain circumstances. For example, when chain is 'deleted' by new user-space chain API, the chain might continue to be used if it is referenced by actions, and can be 're-created' again by user. In such case same chain structure is reused and its template is changed. To protect from described scenario, cache chain template while holding block lock. Introduce standalone tc_chain_notify_delete() function that works with cached template values, instead of chains themselves. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
0 files changed, 0 insertions, 0 deletions