On Wed, Oct 26, 2022 at 10:50:53AM +0200, Florian Lehner wrote: > For maps of type BPF_MAP_TYPE_CPUMAP memory is allocated first before > checking the max_entries argument. If then max_entries is greater than > NR_CPUS additional work needs to be done to free allocated memory before > an error is returned. > This changes moves the check on max_entries before the allocation > happens. > > Signed-off-by: Florian Lehner <dev@xxxxxxxxxxx> I did have a look at the failing CI tests: Running bpftool checks... Comparing /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h (bpf_map_type) and /tmp/work/bpf/bpf/tools/bpf/bpftool/map.c (do_help() TYPE): {'cgroup_storage', 'cgroup_storage_deprecated'} Comparing /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h (bpf_map_type) and /tmp/work/bpf/bpf/tools/bpf/bpftool/Documentation/bpftool-map.rst (TYPE): {'cgroup_storage', 'cgroup_storage_deprecated'} bpftool checks returned 1. It looks to me these were introduced with commit a48b4bf994296a380f9c79620ad4ee7bad4511e1 and are not related to this proposed change.