]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: Replace kvfree with kfree for kzalloc memory
authorFeng Yang <yangfeng@kylinos.cn>
Wed, 27 Aug 2025 03:28:12 +0000 (11:28 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Sep 2025 15:29:52 +0000 (17:29 +0200)
commite4980fa6463624cb608c0f49882e11e8d6ccd590
tree65bbc0e1a7c6be767b13c0b36abc03a2ad744138
parent6417ca85305ecaffef13cf9063ac35da8fba8500
bpf: Replace kvfree with kfree for kzalloc memory

These pointers are allocated by kzalloc. Therefore, replace kvfree() with
kfree() to avoid unnecessary is_vmalloc_addr() check in kvfree(). This is
the remaining unmodified part from [1].

Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20250811123949.552885-1-rongqianfeng@vivo.com
Link: https://lore.kernel.org/bpf/20250827032812.498216-1-yangfeng59949@163.com
kernel/bpf/verifier.c