diff options
author | Andrey Konovalov <[email protected]> | 2022-02-25 19:10:59 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2022-02-26 09:51:17 -0800 |
commit | 70effdc3756c924f4a2b6af1ec4e2e92e18e1b45 (patch) | |
tree | b46aea479f5a389f686059f67c223e8861036374 /lib/test-string_helpers.c | |
parent | db110a99d3367936058727ff4798e3a39c707969 (diff) |
kasan: test: prevent cache merging in kmem_cache_double_destroy
With HW_TAGS KASAN and kasan.stacktrace=off, the cache created in the
kmem_cache_double_destroy() test might get merged with an existing one.
Thus, the first kmem_cache_destroy() call won't actually destroy it but
will only decrease the refcount. This causes the test to fail.
Provide an empty constructor for the created cache to prevent the cache
from getting merged.
Link: https://lkml.kernel.org/r/b597bd434c49591d8af00ee3993a42c609dc9a59.1644346040.git.andreyknvl@google.com
Fixes: f98f966cd750 ("kasan: test: add test case for double-kmem_cache_destroy()")
Signed-off-by: Andrey Konovalov <[email protected]>
Reviewed-by: Marco Elver <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions