Andrey Konovalov f6940e8adc kasan: clean up kasan_cache_create
Reorganize the code to avoid nested if/else checks to improve the
readability.

Also drop the confusing comments about KMALLOC_MAX_SIZE checks: they are
relevant for both SLUB and SLAB (originally, the comments likely confused
KMALLOC_MAX_SIZE with KMALLOC_MAX_CACHE_SIZE).

Link: https://lkml.kernel.org/r/20231221183540.168428-1-andrey.konovalov@linux.dev
Fixes: a5989d4ed40c ("kasan: improve free meta storage in Generic KASAN")
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: Juntong Deng <juntong.deng@outlook.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-29 11:58:46 -08:00
..
2023-12-29 11:58:46 -08:00
2023-09-08 12:16:52 -07:00
2023-12-29 11:58:24 -08:00
2023-12-12 10:57:08 -08:00
2023-12-29 11:58:27 -08:00
2023-10-04 10:32:19 -07:00
2023-10-30 18:01:41 -10:00
2023-10-25 16:47:11 -07:00
2023-12-29 11:58:32 -08:00
2023-12-29 11:58:29 -08:00