diff options
author | Alexander Potapenko <glider@google.com> | 2016-05-21 01:59:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 02:58:30 +0200 |
commit | 4ebb31a42ffa03912447fe1aabbdb28242f909ba (patch) | |
tree | 2c73f495865653dc8b6ab369194d1b06f193822f /mm/slab.c | |
parent | mm: kasan: initial memory quarantine implementation (diff) | |
download | linux-4ebb31a42ffa03912447fe1aabbdb28242f909ba.tar.xz linux-4ebb31a42ffa03912447fe1aabbdb28242f909ba.zip |
mm, kasan: don't call kasan_krealloc() from ksize().
Instead of calling kasan_krealloc(), which replaces the memory
allocation stack ID (if stack depot is used), just unpoison the whole
memory chunk.
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrey Konovalov <adech.fo@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Konstantin Serebryany <kcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c index 28864c022430..cc8bbc1e6bc9 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -4501,7 +4501,7 @@ size_t ksize(const void *objp) /* We assume that ksize callers could use the whole allocated area, * so we need to unpoison this area. */ - kasan_krealloc(objp, size, GFP_NOWAIT); + kasan_unpoison_shadow(objp, size); return size; } |