Merge tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[platform/kernel/linux-rpi.git] / mm / kasan / kasan.h
index b799f11..2e973b3 100644 (file)
@@ -466,18 +466,6 @@ static inline void kasan_unpoison(const void *addr, size_t size, bool init)
 
        if (WARN_ON((unsigned long)addr & KASAN_GRANULE_MASK))
                return;
-       /*
-        * Explicitly initialize the memory with the precise object size to
-        * avoid overwriting the slab redzone. This disables initialization in
-        * the arch code and may thus lead to performance penalty. This penalty
-        * does not affect production builds, as slab redzones are not enabled
-        * there.
-        */
-       if (__slub_debug_enabled() &&
-           init && ((unsigned long)size & KASAN_GRANULE_MASK)) {
-               init = false;
-               memzero_explicit((void *)addr, size);
-       }
        size = round_up(size, KASAN_GRANULE_SIZE);
 
        hw_set_mem_tag_range((void *)addr, size, tag, init);