bpf: Re-enable unit_size checking for global per-cpu allocator
authorHou Tao <houtao1@huawei.com>
Fri, 20 Oct 2023 13:31:58 +0000 (21:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:28 +0000 (15:35 -0800)
commit62752b67324767ce61ebd46c5d58ee6d6c7976ef
tree4174696df65b1fdbcda9e556832279297ecef3a1
parent2e5181afb3291bb2ee1dc7c6c62eafd2de9f1168
bpf: Re-enable unit_size checking for global per-cpu allocator

[ Upstream commit baa8fdecd87bb8751237b45e3bcb5a179e5a12ca ]

With pcpu_alloc_size() in place, check whether or not the size of
the dynamic per-cpu area is matched with unit_size.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20231020133202.4043247-4-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Stable-dep-of: 7ac5c53e0073 ("bpf: Use c->unit_size to select target cache during free")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/bpf/memalloc.c