summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-06-26 01:16:12 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-06-29 00:07:59 +0300
commita78cae2476812cecaa4a33d0086bbb53986906bc (patch)
treee94ee657d160e397cc33a6e0cf8ce76b7d3d851d /tools
parentccff81e1d028bbbf8573d3364a87542386c707bf (diff)
downloadlinux-a78cae2476812cecaa4a33d0086bbb53986906bc.tar.xz
xdp: Move the rxq_info.mem clearing to unreg_mem_model()
xdp_rxq_info_unreg() implicitly calls xdp_rxq_info_unreg_mem_model(). This may well be confusing to the driver authors, and lead to double free if they call xdp_rxq_info_unreg_mem_model() before xdp_rxq_info_unreg() (when mem model type == MEM_TYPE_PAGE_POOL). In fact error path of mvpp2_rxq_init() seems to currently do exactly that. The double free will result in refcount underflow in page_pool_destroy(). Make the interface a little more programmer friendly by clearing type and id so that xdp_rxq_info_unreg_mem_model() can be called multiple times. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210625221612.2637086-1-kuba@kernel.org
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions