diff options
author | Marc Dionne <[email protected]> | 2024-10-31 07:55:34 -0300 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-11-11 13:09:43 -0800 |
commit | e3d37a6f62953962102607fe4491129271510990 (patch) | |
tree | 099d7d066b82d7aaff9f859c8cd3e866e57a37a9 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 431e10601913f8f2006f3ed607e73eedf264b426 (diff) |
tools/mm: fix slabinfo crash when MAX_SLABS is exceeded
The number of slabs can easily exceed the hard coded MAX_SLABS in the
slabinfo tool, causing it to overwrite memory and crash.
Increase the value of MAX_SLABS, and check if that has been exceeded for
each new slab, instead of at the end when it's already too late. Also
move the check for MAX_ALIASES into the loop body.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Marc Dionne <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions