diff options
author | Hou Tao <houtao1@huawei.com> | 2023-09-08 21:39:22 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-09-11 12:41:37 -0700 |
commit | c930472552022bd09aab3cd946ba3f243070d5c7 (patch) | |
tree | e38f453dca80f3838bd511a479362857907e1149 /tools/perf/scripts/python/task-analyzer.py | |
parent | b1d53958b69312e43c118d4093d8f93d3f6f80af (diff) |
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/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions