aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/kasan/kasan.h
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2016-08-02 14:02:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 17:31:41 -0400
commit7e088978933ee186533355ae03a9dc1de99cf6c7 (patch)
tree009af8de8842183482dc3619f429bceafd8e65bb /mm/kasan/kasan.h
parentmm/kasan: get rid of ->state in struct kasan_alloc_meta (diff)
downloadwireguard-linux-7e088978933ee186533355ae03a9dc1de99cf6c7.tar.xz
wireguard-linux-7e088978933ee186533355ae03a9dc1de99cf6c7.zip
kasan: improve double-free reports
Currently we just dump stack in case of double free bug. Let's dump all info about the object that we have. [aryabinin@virtuozzo.com: change double free message per Alexander] Link: http://lkml.kernel.org/r/1470153654-30160-1-git-send-email-aryabinin@virtuozzo.com Link: http://lkml.kernel.org/r/1470062715-14077-6-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/kasan/kasan.h')
-rw-r--r--mm/kasan/kasan.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index 9b7b31e25fd2..e5c2181fee6f 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -99,6 +99,8 @@ static inline bool kasan_report_enabled(void)
void kasan_report(unsigned long addr, size_t size,
bool is_write, unsigned long ip);
+void kasan_report_double_free(struct kmem_cache *cache, void *object,
+ s8 shadow);
#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB)
void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache);