patch-2.4.15 linux/arch/s390x/mm/fault.c

Next file: linux/arch/s390x/mm/init.c
Previous file: linux/arch/s390x/kernel/wrapper32.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/arch/s390x/mm/fault.c linux/arch/s390x/mm/fault.c
@@ -159,14 +159,17 @@
 	/*
 	 * Check whether we have a user MM in the first place.
 	 */
-        if (in_interrupt() || !mm)
+        if (in_interrupt() || !mm || !(regs->psw.mask & _PSW_IO_MASK_BIT))
                 goto no_context;
 
 	/*
 	 * When we get here, the fault happened in the current
-	 * task's user address space, so we search the VMAs
+	 * task's user address space, so we can switch on the
+	 * interrupts again and then search the VMAs
 	 */
 
+	__sti();
+
         down_read(&mm->mmap_sem);
 
         vma = find_vma(mm, address);
@@ -419,6 +422,13 @@
 	 */
 	tsk = (struct task_struct *)
 		(*((unsigned long *) __LC_PFAULT_INTPARM) - THREAD_SIZE);
+
+	/*
+	 * We got all needed information from the lowcore and can
+	 * now safely switch on interrupts.
+	 */
+	if (regs->psw.mask & PSW_PROBLEM_STATE)
+		__sti();
 
 	if (subcode & 0x0080) {
 		/* signal bit is set -> a page has been swapped in by VM */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)