diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-11 09:55:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-12 19:41:33 +0100 |
commit | 726d061286ceeeabda54ba6f080d0cb8f187a9d7 (patch) | |
tree | 1bbd36ec6d6bf3e1a53c1de07c9c9ed4560eabd1 /include/net/sch_generic.h | |
parent | net: sched: refactor tp insert/delete for concurrent execution (diff) | |
download | linux-726d061286ceeeabda54ba6f080d0cb8f187a9d7.tar.xz linux-726d061286ceeeabda54ba6f080d0cb8f187a9d7.zip |
net: sched: prevent insertion of new classifiers during chain flush
Extend tcf_chain with 'flushing' flag. Use the flag to prevent insertion of
new classifier instances when chain flushing is in progress in order to
prevent resource leak when tcf_proto is created by unlocked users
concurrently.
Return EAGAIN error from tcf_chain_tp_insert_unique() to restart
tc_new_tfilter() and lookup the chain/proto again.
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')
-rw-r--r-- | include/net/sch_generic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 083e566fc380..e8cf36ed3e87 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -356,6 +356,7 @@ struct tcf_chain { unsigned int refcnt; unsigned int action_refcnt; bool explicitly_created; + bool flushing; const struct tcf_proto_ops *tmplt_ops; void *tmplt_priv; }; |