mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
UPSTREAM: kasan: drop CONFIG_KASAN_GENERIC check from kasan_init_cache_meta
As kasan_init_cache_meta() is only defined for the Generic mode, it does
not require the CONFIG_KASAN_GENERIC check.
Link: https://lkml.kernel.org/r/211f8f2b213aa91e9148ca63342990b491c4917a.1662411799.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Bug: 254721825
(cherry picked from commit 02856beb2d)
Change-Id: I49e6f86f9c0da89b6d893695ed5d578648d1e227
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
This commit is contained in:
@@ -367,12 +367,6 @@ void kasan_init_cache_meta(struct kmem_cache *cache, unsigned int *size)
|
||||
/* Continue, since free meta might still fit. */
|
||||
}
|
||||
|
||||
/* Only the generic mode uses free meta or flexible redzones. */
|
||||
if (!IS_ENABLED(CONFIG_KASAN_GENERIC)) {
|
||||
cache->kasan_info.free_meta_offset = KASAN_NO_FREE_META;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add free meta into redzone when it's not possible to store
|
||||
* it in the object. This is the case when:
|
||||
|
||||
Reference in New Issue
Block a user