aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorFlorian Lehner <[email protected]>2022-10-28 20:34:05 +0200
committerMartin KaFai Lau <[email protected]>2022-10-28 15:45:58 -0700
commite39e739ab57399f46167d453bbdb8ef8d57c6488 (patch)
tree4c71035f5de99b1d0d4d921ecb00775beda8add4 /tools/perf/scripts/python/net_dropmonitor.py
parentb6d207999c350b19a787e48757f98198d0bf3e5b (diff)
bpf: check max_entries before allocating memory
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions