diff options
author | 2023-09-08 21:39:22 +0800 | |
---|---|---|
committer | 2023-09-11 12:41:37 -0700 | |
commit | c930472552022bd09aab3cd946ba3f243070d5c7 (patch) | |
tree | e38f453dca80f3838bd511a479362857907e1149 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bpf: Don't prefill for unused bpf_mem_cache (diff) | |
download | wireguard-linux-c930472552022bd09aab3cd946ba3f243070d5c7.tar.xz wireguard-linux-c930472552022bd09aab3cd946ba3f243070d5c7.zip |
bpf: Ensure unit_size is matched with slab cache object size
Add extra check in bpf_mem_alloc_init() to ensure the unit_size of
bpf_mem_cache is matched with the object_size of underlying slab cache.
If these two sizes are unmatched, print a warning once and return
-EINVAL in bpf_mem_alloc_init(), so the mismatch can be found early and
the potential issue can be prevented.
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20230908133923.2675053-4-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions