diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2025-09-15 15:55:12 +0200 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2025-09-15 16:47:36 +0200 |
commit | a21fe7b010e32c51c62a86dcba02f9404ed77cac (patch) | |
tree | b9467a021d7ca066352aea73b8bb1af16f176308 /scripts/gdb/linux/timerlist.py | |
parent | 40522db59b5bd36dd63d215bfb7fa83d64bce05a (diff) |
slab: validate slab before using it in alloc_single_from_partial()
We touch slab->freelist and slab->inuse before checking the slab pointer
is actually sane. Do that validation first, which will be safer. We can
thus also remove the check from alloc_debug_processing().
This adds a new "s->flags & SLAB_CONSISTENCY_CHECKS" test but
alloc_single_from_partial() is only called for caches with debugging
enabled so it's acceptable.
In alloc_single_from_new_slab() we just created the struct slab and call
alloc_debug_processing() to mainly set up redzones, tracking etc, while
not really expecting the consistency checks to fail. Thus don't validate
it there.
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions