slab fixes for 6.12-rc6
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEe7vIQRWZI0iWSE3xu+CwddJFiJoFAmcgrxcACgkQu+CwddJF iJrq9ggAiZ/2c7p23s52LdVhT9GTyV5omVOh2kDztVx4w6RM3RbkhkLWdqt0XUag uf1TJe6kOvnCeHEFEEo3sqPj820XebxKDf0GGCdI6a9f4n30ipKH+vWSQ0iutKO/ dOBdArxr0FGOV5VZR9i3xQ6sUqZXXUbJdte0c0ovp6Q6HDHTeQeKNhOQ2fv33TG/ 7jBh5HVyhI6JE/+TOxrMaklH0IqYBb6z49wdbaN7XBvXVXlb5MtOZy109gfUHDwe tfktifyE45VtmF0WdHfxDbCnqyDSG1Jm3wsLDbMq+voJ1BQlUvIZ5Dv4kucYqffm VN5HkH6uQ09aoounBoU4g50UYeNpiQ== =xAw8 -----END PGP SIGNATURE----- Merge tag 'slab-for-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fixes from Vlastimil Babka: - Fix for a slub_kunit test warning with MEM_ALLOC_PROFILING_DEBUG (Pei Xiao) - Fix for a MTE-based KASAN BUG in krealloc() (Qun-Wei Lin) * tag 'slab-for-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm: krealloc: Fix MTE false alarm in __do_krealloc slub/kunit: fix a WARNING due to unwrapped __kmalloc_cache_noprof
This commit is contained in:
commit
7fbaacafbc
@ -141,7 +141,7 @@ static void test_kmalloc_redzone_access(struct kunit *test)
|
|||||||
{
|
{
|
||||||
struct kmem_cache *s = test_kmem_cache_create("TestSlub_RZ_kmalloc", 32,
|
struct kmem_cache *s = test_kmem_cache_create("TestSlub_RZ_kmalloc", 32,
|
||||||
SLAB_KMALLOC|SLAB_STORE_USER|SLAB_RED_ZONE);
|
SLAB_KMALLOC|SLAB_STORE_USER|SLAB_RED_ZONE);
|
||||||
u8 *p = __kmalloc_cache_noprof(s, GFP_KERNEL, 18);
|
u8 *p = alloc_hooks(__kmalloc_cache_noprof(s, GFP_KERNEL, 18));
|
||||||
|
|
||||||
kasan_disable_current();
|
kasan_disable_current();
|
||||||
|
|
||||||
|
@ -1209,7 +1209,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
|
|||||||
/* Zero out spare memory. */
|
/* Zero out spare memory. */
|
||||||
if (want_init_on_alloc(flags)) {
|
if (want_init_on_alloc(flags)) {
|
||||||
kasan_disable_current();
|
kasan_disable_current();
|
||||||
memset((void *)p + new_size, 0, ks - new_size);
|
memset(kasan_reset_tag(p) + new_size, 0, ks - new_size);
|
||||||
kasan_enable_current();
|
kasan_enable_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user