Marc Dionne e3d37a6f62 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/20241031105534.565533-1-marc.c.dionne@gmail.com
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-11-11 13:09:43 -08:00
..
2024-04-25 20:56:15 -07:00
2024-09-02 12:27:35 +02:00
2024-09-19 08:15:30 +02:00
2024-09-05 19:27:13 +01:00
2024-09-25 11:35:19 -07:00
2024-09-23 12:01:45 -07:00
2024-09-27 10:14:35 -07:00
2024-09-24 12:57:46 -07:00