diff options
author | Chengming Zhou <chengming.zhou@linux.dev> | 2024-06-07 11:40:13 +0300 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-06-07 12:03:24 +0300 |
commit | adef2aeaa2b936c97865d56c59be2cb7266acbb7 (patch) | |
tree | 79957bf4bc610ff7de0112abd6b9573ccd258210 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 47d911b02cbe61494bb066ad84cc66d25091d506 (diff) | |
download | linux-adef2aeaa2b936c97865d56c59be2cb7266acbb7.tar.xz |
slab: don't put freepointer outside of object if only orig_size
The commit 946fa0dbf2d8 ("mm/slub: extend redzone check to extra
allocated kmalloc space than requested") will extend right redzone
when allocating for orig_size < object_size. So we can't overlay the
freepointer in the object space in this case.
But the code looks like it forgot to check SLAB_RED_ZONE, since there
won't be extended right redzone if only orig_size enabled.
As we are here, make this complex conditional expressions a little
prettier and add some comments about extending right redzone when
slub_debug_orig_size() enabled.
Reviewed-by: Feng Tang <feng.tang@intel.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions