mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-05-02 22:43:50 -04:00
kasan: save free stack traces for slab mempools
Make kasan_mempool_poison_object save free stack traces for slab and kmalloc mempools when the object is freed into the mempool. Also simplify and rename ____kasan_slab_free to poison_slab_object and do a few other reability changes. Link: https://lkml.kernel.org/r/413a7c7c3344fb56809853339ffaabc9e4905e94.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Cc: Alexander Lobakin <alobakin@pm.me> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Breno Leitao <leitao@debian.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Marco Elver <elver@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
cf0da2afe3
commit
b556a462eb
@@ -268,8 +268,9 @@ bool __kasan_mempool_poison_object(void *ptr, unsigned long ip);
|
||||
* to reuse them instead of freeing them back to the slab allocator (e.g.
|
||||
* mempool).
|
||||
*
|
||||
* This function poisons a slab allocation without initializing its memory and
|
||||
* without putting it into the quarantine (for the Generic mode).
|
||||
* This function poisons a slab allocation and saves a free stack trace for it
|
||||
* without initializing the allocation's memory and without putting it into the
|
||||
* quarantine (for the Generic mode).
|
||||
*
|
||||
* This function also performs checks to detect double-free and invalid-free
|
||||
* bugs and reports them. The caller can use the return value of this function
|
||||
|
||||
Reference in New Issue
Block a user