aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2023-07-28 23:47:17 +0200
committerJakub Kicinski <[email protected]>2023-07-31 14:44:02 -0700
commit079082c60affefeb9d2bd4176a4f2b390a9ccfda (patch)
tree07d7e323408c1f91ac844d85f3b42b39e5ac59a0 /tools/perf/scripts/python/bin
parentdf41fa677d9b4717c930afbe88b06f5cefdacb21 (diff)
tcx: Fix splat during dev unregister
During unregister_netdevice_many_notify(), the ordering of our concerned function calls is like this: unregister_netdevice_many_notify dev_shutdown qdisc_put clsact_destroy tcx_uninstall The syzbot reproducer triggered a case that the qdisc refcnt is not zero during dev_shutdown(). tcx_uninstall() will then WARN_ON_ONCE(tcx_entry(entry)->miniq_active) because the miniq is still active and the entry should not be freed. The latter assumed that qdisc destruction happens before tcx teardown. This fix is to avoid tcx_uninstall() doing tcx_entry_free() when the miniq is still alive and let the clsact_destroy() do the free later, so that we do not assume any specific ordering for either of them. If still active, tcx_uninstall() does clear the entry when flushing out the prog/link. clsact_destroy() will then notice the "!tcx_entry_is_active()" and then does the tcx_entry_free() eventually. Fixes: e420bed02507 ("bpf: Add fd-based tcx multi-prog infra with link support") Reported-by: [email protected] Reported-by: Leon Romanovsky <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Co-developed-by: Daniel Borkmann <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Tested-by: [email protected] Tested-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/222255fe07cb58f15ee662e7ee78328af5b438e4.1690549248.git.daniel@iogearbox.net Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions