x86/uaccess, sched/preempt: Verify access_ok() context
authorPeter Zijlstra <peterz@infradead.org>
Tue, 22 Nov 2016 09:57:15 +0000 (10:57 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 6 Dec 2016 09:32:40 +0000 (10:32 +0100)
commit7c4788950ba5922fde976d80b72baf46f14dee8d
tree71f081928406571e40f14f8fa2f5a54788933083
parent0a21fc1214a25427e13538665ff2afbe707a0b9f
x86/uaccess, sched/preempt: Verify access_ok() context

I recently encountered wreckage because access_ok() was used where it
should not be, add an explicit WARN when access_ok() is used wrongly.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/uaccess.h
include/linux/preempt.h