]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm, kasan: Silence KASAN warnings in get_wchan()
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Mon, 19 Oct 2015 08:37:18 +0000 (11:37 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Oct 2015 09:04:19 +0000 (11:04 +0200)
commit81539dfdd4b70f73de84abef09339544f44c487b
tree0325b7fa7aa4f92950b003944575f5157c3e844b
parent9e97a25635b6fa0dc00d28ec902fc106863121b8
x86/mm, kasan: Silence KASAN warnings in get_wchan()

get_wchan() is racy by design, it may access volatile stack
of running task, thus it may access redzone in a stack frame
and cause KASAN to warn about this.

Use READ_ONCE_NOCHECK() to silence these warnings.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kostya Serebryany <kcc@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Cc: kasan-dev <kasan-dev@googlegroups.com>
Link: http://lkml.kernel.org/r/1445243838-17763-3-git-send-email-aryabinin@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/process.c