x86/microcode/intel: Move the BUG_ON up and turn it into WARN_ON
authorBorislav Petkov <bp@suse.de>
Wed, 3 Feb 2016 11:33:38 +0000 (12:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 9 Feb 2016 10:41:17 +0000 (11:41 +0100)
commit58b5f2cc4bdbc9b616e68639f5a84886aa5be590
tree07bec71eea3310896bcc6faf04dcdba9b41d01b5
parentde778275c295825e6638f3f74103f40642d45caa
x86/microcode/intel: Move the BUG_ON up and turn it into WARN_ON

If we're going to BUG_ON() because we're running on the wrong CPU, we
better do it as the first thing we do when entering that function. And
also, turn it into a WARN_ON() because it is not worth to panic the
system if we apply the microcode on the wrong CPU - we're simply going
to exit early.

Tested-by: Thomas Voegtle <tv@lio96.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
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/1454499225-21544-11-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/microcode/intel.c