summaryrefslogtreecommitdiff
path: root/net/sched/cls_bpf.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-12-07 20:56:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-19 10:42:54 +0300
commita80de288d6c5188f734e13302ca83141cd0211d6 (patch)
tree773dac48fd391bf5f1420c113b204bb1a75c4030 /net/sched/cls_bpf.c
parent127bda4b09129bf8448cfd2f453ff4acab188922 (diff)
downloadlinux-a80de288d6c5188f734e13302ca83141cd0211d6.tar.xz
net: sched: drop qdisc_reset from dev_graft_qdisc
[ Upstream commit 7bbde83b1860c28a1cc35516352c4e7e5172c29a ] In qdisc_graft_qdisc a "new" qdisc is attached and the 'qdisc_destroy' operation is called on the old qdisc. The destroy operation will wait a rcu grace period and call qdisc_rcu_free(). At which point gso_cpu_skb is free'd along with all stats so no need to zero stats and gso_cpu_skb from the graft operation itself. Further after dropping the qdisc locks we can not continue to call qdisc_reset before waiting an rcu grace period so that the qdisc is detached from all cpus. By removing the qdisc_reset() here we get the correct property of waiting an rcu grace period and letting the qdisc_destroy operation clean up the qdisc correctly. Note, a refcnt greater than 1 would cause the destroy operation to be aborted however if this ever happened the reference to the qdisc would be lost and we would have a memory leak. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched/cls_bpf.c')
0 files changed, 0 insertions, 0 deletions