diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-11 10:55:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-12 13:41:32 -0500 |
commit | a5654820bb4b1f5f21eb83b8fb9de79ce1382d2b (patch) | |
tree | 2d297adc23f02d83091414deb0defe56b903372a /net/sched/sch_generic.c | |
parent | bbf73830cd48cff1599811d4f69c7cfd49c7b869 (diff) | |
download | lwn-a5654820bb4b1f5f21eb83b8fb9de79ce1382d2b.tar.gz lwn-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 'net/sched/sch_generic.c')
0 files changed, 0 insertions, 0 deletions