summaryrefslogtreecommitdiffstats
path: root/fs/qnx6
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2017-09-11 16:33:31 -0700
committerDavid S. Miller <davem@davemloft.net>2017-09-12 20:41:02 -0700
commite2ef75445340ca7ec2c4558f84ae6c8c5d650fc8 (patch)
tree7a56e93516b7ddd563fcfaadf508c3f0cc4783cb /fs/qnx6
parentd7fb60b9cafb982cb2e46a267646a8dfd4f2e5da (diff)
downloadop-kernel-dev-e2ef75445340ca7ec2c4558f84ae6c8c5d650fc8.zip
op-kernel-dev-e2ef75445340ca7ec2c4558f84ae6c8c5d650fc8.tar.gz
net_sched: fix reference counting of tc filter chain
This patch fixes the following ugliness of tc filter chain refcnt: a) tp proto should hold a refcnt to the chain too. This significantly simplifies the logic. b) Chain 0 is no longer special, it is created with refcnt=1 like any other chains. All the ugliness in tcf_chain_put() can be gone! c) No need to handle the flushing oddly, because block still holds chain 0, it can not be released, this guarantees block is the last user. d) The race condition with RCU callbacks is easier to handle with just a rcu_barrier(). Much easier to understand, nothing to hide. Thanks to the previous patch. Please see also the comments in code. e) Make the code understandable by humans, much less error-prone. Fixes: 744a4cf63e52 ("net: sched: fix use after free when tcf_chain_destroy is called multiple times") Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Cc: Jiri Pirko <jiri@mellanox.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/qnx6')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud