Re: [PATCH v2 bpf-next] bpf: Replace kvfree with kfree for kzalloc memory

From: Yonghong Song
Date: Wed Aug 27 2025 - 01:02:16 EST




On 8/26/25 8:28 PM, Feng Yang wrote:
From: Feng Yang <yangfeng@xxxxxxxxxx>

These pointers are allocated by kzalloc.
Replace kvfree() with kfree() to avoid unnecessary is_vmalloc_addr()
check in kvfree().

This is the remaining unmodified part from [1].

[1] https://lore.kernel.org/bpf/20250811123949.552885-1-rongqianfeng@xxxxxxxx.

Signed-off-by: Feng Yang <yangfeng@xxxxxxxxxx>

Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>