summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2023-11-11 12:38:21 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-08 08:52:22 +0100
commitd9105720404c2c35ae79949a06a95ce88ef6280e (patch)
treefe4f9aab826e89e872adcc4bca62bc4a22e12aa0 /include/uapi/linux
parent9453d9a03000787e29205c529bc6ba1fe7b03df4 (diff)
bpf: Add missed allocation hint for bpf_mem_cache_alloc_flags()
[ Upstream commit 75a442581d05edaee168222ffbe00d4389785636 ] bpf_mem_cache_alloc_flags() may call __alloc() directly when there is no free object in free list, but it doesn't initialize the allocation hint for the returned pointer. It may lead to bad memory dereference when freeing the pointer, so fix it by initializing the allocation hint. Fixes: 822fb26bdb55 ("bpf: Add a hint to allocated objects.") Signed-off-by: Hou Tao <houtao1@huawei.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20231111043821.2258513-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions