summaryrefslogtreecommitdiffstats
path: root/net/bpf
diff options
context:
space:
mode:
authorYihao Han <hanyihao@vivo.com>2022-03-10 01:28:27 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2022-03-10 16:20:02 +0100
commit743bec1b78af174f588956ffbdb9bca4348e3eaf (patch)
tree69c4d5c219b0a343f646f9451b2ea97227545d9b /net/bpf
parenteecbfd976e8617125c69e4b3efc89fe34eac7bb1 (diff)
downloadlinux-743bec1b78af174f588956ffbdb9bca4348e3eaf.tar.gz
linux-743bec1b78af174f588956ffbdb9bca4348e3eaf.tar.bz2
linux-743bec1b78af174f588956ffbdb9bca4348e3eaf.zip
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: b530e9e1063e ("bpf: Add "live packet" mode for XDP in BPF_PROG_RUN") Signed-off-by: Yihao Han <hanyihao@vivo.com> Signed-off-by: Daniel 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
Diffstat (limited to 'net/bpf')
-rw-r--r--net/bpf/test_run.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index 0acdc37c8415..24405a280a9b 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -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;
}