linux/arch/arc
Vineet Gupta 13d9045508 ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe
commit 8aa9e85ada upstream.

There was a very small race window where resume to kernel mode from a
Exception Path (or pure kernel mode which is true for most of ARC
exceptions anyways), was not disabling interrupts in restore_regs,
clobbering the exception regs

Anton found the culprit call flow (after many sleepless nights)

| 1. we got a Trap from user land
| 2. started to service it.
| 3. While doing some stuff on user-land memory (I think it is padzero()),
|     we got a DataTlbMiss
| 4. On return from it we are taking "resume_kernel_mode" path
| 5. NEED_RESHED is not set, so we go to "return from exception" path in
|     restore regs.
| 6. there seems to be IRQ happening

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Francois Bedard <Francois.Bedard@synopsys.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-13 13:32:50 +02:00
..
boot ARC: [nsimosci] Unbork console 2014-04-14 06:50:05 -07:00
configs ARC: [nsimosci] Unbork console 2014-04-14 06:50:05 -07:00
include Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-01-30 16:58:05 -08:00
kernel ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe 2014-05-13 13:32:50 +02:00
lib ARC: [lib] strchr breakage in Big-endian configuration 2013-08-24 11:24:53 -07:00
mm ARC: Use correct PTAG register for icache flush 2014-03-07 10:12:56 -08:00
oprofile ARC: OProfile support 2013-02-15 23:16:00 +05:30
plat-arcfpga ARC: Remove ARC_HAS_COH_RTSC 2014-05-13 13:32:49 +02:00
plat-tb10x ARC: [TB10x] Updates for GPIO and pinctrl 2013-11-11 09:57:44 +05:30
Kbuild ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
Kconfig ARC changes for 3.14 2014-01-25 10:50:43 -08:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile ARC: Adjustments for gcc 4.8 2013-06-27 14:35:32 +05:30