--- linux/arch/i386/kernel/kprobes.c.old 2004-11-18 16:22:46.000000000 +0300 +++ linux/arch/i386/kernel/kprobes.c 2004-12-02 22:01:05.000000000 +0300 @@ -92,6 +92,11 @@ int ret = 0; u8 *addr = (u8 *) (regs->eip - 1); + /* If we are in v86 mode or CS is not ours, get out */ + if ((regs->eflags & VM_MASK) || regs->xcs != __KERNEL_CS) { + return 0; + } + /* We're in an interrupt, but this is clear and BUG()-safe. */ preempt_disable(); @@ -117,10 +122,6 @@ p = get_kprobe(addr); if (!p) { unlock_kprobes(); - if (regs->eflags & VM_MASK) { - /* We are in virtual-8086 mode. Return 0 */ - goto no_kprobe; - } if (*addr != BREAKPOINT_INSTRUCTION) { /*