Re: 2.1.24 / DOSEMU / DOS 7

David S. Miller (davem@jenolan.rutgers.edu)
Thu, 30 Jan 1997 02:32:33 -0500


Please try this patch:

--- arch/i386/kernel/vm86.c.~1~ Sun Jan 26 05:07:05 1997
+++ arch/i386/kernel/vm86.c Thu Jan 30 02:34:19 1997
@@ -454,7 +454,9 @@
return ret;
}

-
+/* This always gets called while holding kernel lock already, from
+ * traps.c:do_general_protection().
+ */
void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
{
unsigned char *csp, *ssp;
@@ -466,9 +468,8 @@
#define VM86_FAULT_RETURN \
if (VMPI.force_return_for_pic && (VEFLAGS & IF_MASK)) \
return_to_32bit(regs, VM86_PICRETURN); \
- goto out;
+ return;

- lock_kernel();
csp = (unsigned char *) (regs->cs << 4);
ssp = (unsigned char *) (regs->ss << 4);
sp = SP(regs);
@@ -532,7 +533,7 @@
return_to_32bit(regs, VM86_INTx + (intno << 8));
}
do_int(regs, intno, ssp, sp);
- goto out;
+ return;
}

/* iret */
@@ -565,8 +566,6 @@
default:
return_to_32bit(regs, VM86_UNKNOWN);
}
-out:
- unlock_kernel();
}

/* ---------------- vm86 special IRQ passing stuff ----------------- */