aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <[email protected]>2021-01-18 16:03:33 +0000
committerDaniel Borkmann <[email protected]>2021-01-19 21:47:04 +0000
commitb425e24a934e21a502d25089c6c7443d799c5594 (patch)
treec44bdeeda97f5b4f683e2220bc63d56061bcf1e3 /tools/perf/builtin-script.c
parentbpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback (diff)
downloadkernel-b425e24a934e21a502d25089c6c7443d799c5594.tar.gz
kernel-b425e24a934e21a502d25089c6c7443d799c5594.zip
xsk: Clear pool even for inactive queues
The number of queues can change by other means, rather than ethtool. For example, attaching an mqprio qdisc with num_tc > 1 leads to creating multiple sets of TX queues, which may be then destroyed when mqprio is deleted. If an AF_XDP socket is created while mqprio is active, dev->_tx[queue_id].pool will be filled, but then real_num_tx_queues may decrease with deletion of mqprio, which will mean that the pool won't be NULLed, and a further increase of the number of TX queues may expose a dangling pointer. To avoid any potential misbehavior, this commit clears pool for RX and TX queues, regardless of real_num_*_queues, still taking into consideration num_*_queues to avoid overflows. Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Fixes: a41b4f3c58dd ("xsk: simplify xdp_clear_umem_at_qid implementation") Signed-off-by: Maxim Mikityanskiy <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Björn Töpel <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions