summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-10-30 03:24:02 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2024-10-30 03:24:02 +0100
commit7fbaacafbc55c56ca156a628a805f79a2cbe7103 (patch)
tree44e51d470b075f4c5e11f1b3a54ad8c526387892 /mm
parentMerge tag 'mm-hotfixes-stable-2024-10-28-21-50' of git://git.kernel.org/pub/s... (diff)
parentmm: krealloc: Fix MTE false alarm in __do_krealloc (diff)
downloadlinux-7fbaacafbc55c56ca156a628a805f79a2cbe7103.tar.xz
linux-7fbaacafbc55c56ca156a628a805f79a2cbe7103.zip
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
Diffstat (limited to 'mm')
-rw-r--r--mm/slab_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 3d26c257ed8b..552b92dfdac7 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1209,7 +1209,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
/* Zero out spare memory. */
if (want_init_on_alloc(flags)) {
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();
}