summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/rtrap_64.S
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-05-06 02:56:07 +0200
committerJames Morris <jmorris@namei.org>2010-05-06 02:56:07 +0200
commit0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch)
tree81b1a2305d16c873371b65c5a863c0268036cefe /arch/sparc/kernel/rtrap_64.S
parentTOMOYO: Use GFP_NOFS rather than GFP_KERNEL. (diff)
parentMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/air... (diff)
downloadlinux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.xz
linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.zip
Merge branch 'master' into next
Diffstat (limited to 'arch/sparc/kernel/rtrap_64.S')
-rw-r--r--arch/sparc/kernel/rtrap_64.S12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S
index 83f1873c6c13..090b9e9ad5e3 100644
--- a/arch/sparc/kernel/rtrap_64.S
+++ b/arch/sparc/kernel/rtrap_64.S
@@ -130,7 +130,17 @@ rtrap_xcall:
nop
call trace_hardirqs_on
nop
- wrpr %l4, %pil
+ /* Do not actually set the %pil here. We will do that
+ * below after we clear PSTATE_IE in the %pstate register.
+ * If we re-enable interrupts here, we can recurse down
+ * the hardirq stack potentially endlessly, causing a
+ * stack overflow.
+ *
+ * It is tempting to put this test and trace_hardirqs_on
+ * call at the 'rt_continue' label, but that will not work
+ * as that path hits unconditionally and we do not want to
+ * execute this in NMI return paths, for example.
+ */
#endif
rtrap_no_irq_enable:
andcc %l1, TSTATE_PRIV, %l3