aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sctop.py
diff options
context:
space:
mode:
authorAndrey Ryabinin <[email protected]>2016-06-24 14:49:34 -0700
committerLinus Torvalds <[email protected]>2016-06-24 17:23:52 -0700
commit9b75a867cc9ddbafcaf35029358ac500f2635ff3 (patch)
treecf3cb90c4ee9e12a42d89881c3aa12d8bb0ba33b /tools/perf/scripts/python/sctop.py
parenta6921c2974a09bfe8d039980c0b14a305644930b (diff)
mm: mempool: kasan: don't poot mempool objects in quarantine
Currently we may put reserved by mempool elements into quarantine via kasan_kfree(). This is totally wrong since quarantine may really free these objects. So when mempool will try to use such element, use-after-free will happen. Or mempool may decide that it no longer need that element and double-free it. So don't put object into quarantine in kasan_kfree(), just poison it. Rename kasan_kfree() to kasan_poison_kfree() to respect that. Also, we shouldn't use kasan_slab_alloc()/kasan_krealloc() in kasan_unpoison_element() because those functions may update allocation stacktrace. This would be wrong for the most of the remove_element call sites. (The only call site where we may want to update alloc stacktrace is in mempool_alloc(). Kmemleak solves this by calling kmemleak_update_trace(), so we could make something like that too. But this is out of scope of this patch). Fixes: 55834c59098d ("mm: kasan: initial memory quarantine implementation") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andrey Ryabinin <[email protected]> Reported-by: Kuthonuzo Luruo <[email protected]> Acked-by: Alexander Potapenko <[email protected]> Cc: Dmitriy Vyukov <[email protected]> Cc: Kostya Serebryany <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions