diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2017-10-30 19:10:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-31 03:06:01 +0100 |
commit | 822e86d997e4d8f942818ea6ac1711f59a66ebef (patch) | |
tree | 2707ef3b0ec70f0d2332d7704a50a0ccc958fb52 /tools/testing/selftests/ptp | |
parent | l2tp: hold tunnel in pppol2tp_connect() (diff) | |
download | linux-822e86d997e4d8f942818ea6ac1711f59a66ebef.tar.xz linux-822e86d997e4d8f942818ea6ac1711f59a66ebef.zip |
net_sched: remove tcf_block_put_deferred()
In commit 7aa0045dadb6 ("net_sched: introduce a workqueue for RCU callbacks of tc filter")
I defer tcf_chain_flush() to a workqueue, this causes a use-after-free
because qdisc is already destroyed after we queue this work.
The tcf_block_put_deferred() is no longer necessary after we get RTNL
for each tc filter destroy work, no others could jump in at this point.
Same for tcf_chain_hold(), we are fully serialized now.
This also reduces one indirection therefore makes the code more
readable. Note this brings back a rcu_barrier(), however comparing
to the code prior to commit 7aa0045dadb6 we still reduced one
rcu_barrier(). For net-next, we can consider to refcnt tcf block to
avoid it.
Fixes: 7aa0045dadb6 ("net_sched: introduce a workqueue for RCU callbacks of tc filter")
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/ptp')
0 files changed, 0 insertions, 0 deletions