x86/traps: Use a new on_thread_stack() helper to clean up an assertion
authorAndy Lutomirski <luto@kernel.org>
Thu, 2 Nov 2017 07:59:17 +0000 (00:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:19 +0000 (14:26 +0100)
commit35c1d57e63914254d463a2361b6348a2b823c70d
treec451e7bb44c904ecb1fa75864866e8931225d2c0
parentc6f563cd1393521c3bd74730cb972f4ec373694a
x86/traps: Use a new on_thread_stack() helper to clean up an assertion

commit 3383642c2f9d4f5b4fa37436db4a109a1a10018c upstream.

Let's keep the stack-related logic together rather than open-coding
a comparison in an assertion in the traps code.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/856b15bee1f55017b8f79d3758b0d51c48a08cf8.1509609304.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/processor.h
arch/x86/kernel/traps.c