提交 743bec1b 编写于 作者: Y Yihao Han 提交者: Daniel Borkmann

bpf, test_run: Use kvfree() for memory allocated with kvmalloc()

It is allocated with kvmalloc(), the corresponding release function
should not be kfree(), use kvfree() instead.

Generated by: scripts/coccinelle/api/kfree_mismatch.cocci

Fixes: b530e9e1 ("bpf: Add "live packet" mode for XDP in BPF_PROG_RUN")
Signed-off-by: NYihao Han <hanyihao@vivo.com>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
Cc: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20220310092828.13405-1-hanyihao@vivo.com
上级 eecbfd97
......@@ -196,9 +196,9 @@ static int xdp_test_run_setup(struct xdp_test_data *xdp, struct xdp_buff *orig_c
err_mmodel:
page_pool_destroy(pp);
err_pp:
kfree(xdp->skbs);
kvfree(xdp->skbs);
err_skbs:
kfree(xdp->frames);
kvfree(xdp->frames);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册