Commit 080c8579 authored by Feng Tang's avatar Feng Tang Committed by Vlastimil Babka
Browse files

mm/slub, kunit: Add testcase for krealloc redzone and zeroing

Danilo Krummrich raised issue about krealloc+GFP_ZERO [1], and Vlastimil
suggested to add some test case which can sanity test the kmalloc-redzone
and zeroing by utilizing the kmalloc's 'orig_size' debug feature.

It covers the grow and shrink case of krealloc() re-using current kmalloc
object, and the case of re-allocating a new bigger object.

[1]. https://lore.kernel.org/lkml/20240812223707.32049-1-dakr@kernel.org/



Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 5474d33c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment