x86/fault: Don't set thread.cr2, etc before OOPSing
authorAndy Lutomirski <luto@kernel.org>
Mon, 19 Nov 2018 22:45:32 +0000 (14:45 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Nov 2018 07:44:30 +0000 (08:44 +0100)
commit1ad33f5aec20f53785dbad44c6fb3b204aefd921
tree366fd9437bbb179b693b15b5f5817e594a137022
parente49d3cbef0176c182b86206185f137a87f16ab91
x86/fault: Don't set thread.cr2, etc before OOPSing

The fault handling code sets the cr2, trap_nr, and error_code fields
in thread_struct before OOPSing.  No one reads those fields during
an OOPS, so remove the code to set them.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
Link: http://lkml.kernel.org/r/d418022aa0fad9cb40467aa7acaf4e95be50ee96.1542667307.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/fault.c