]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386: Fix entry.S code with !CONFIG_VM86
authorJoe Korty <joe.korty@ccur.com>
Thu, 7 Dec 2006 01:14:04 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:04 +0000 (02:14 +0100)
The entry.S code at work_notifysig is surely wrong.  It drops into unrelated
code if the branch to work_notifysig_v86 is taken, and CONFIG_VM86=n.

[PATCH] Make vm86 support optional
tree 9b5daef5280800a0006343a17f63072658d91a1d
pushed to git Jan 8, 2006, and first appears in 2.6.16

The 'fix' here is to also compile out the vm86 test & branch when
CONFIG_VM86=n.

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/entry.S

index d7423efaeea42c95dd619bcc08545b4c5ba65ae0..0220bc8cbb43285d2c1a01d0ee2b75d986e0b4d1 100644 (file)
@@ -457,6 +457,7 @@ work_resched:
 
 work_notifysig:                                # deal with pending signals and
                                        # notify-resume requests
+#ifdef CONFIG_VM86
        testl $VM_MASK, PT_EFLAGS(%esp)
        movl %esp, %eax
        jne work_notifysig_v86          # returning to kernel-space or
@@ -467,17 +468,18 @@ work_notifysig:                           # deal with pending signals and
 
        ALIGN
 work_notifysig_v86:
-#ifdef CONFIG_VM86
        pushl %ecx                      # save ti_flags for do_notify_resume
        CFI_ADJUST_CFA_OFFSET 4
        call save_v86_state             # %eax contains pt_regs pointer
        popl %ecx
        CFI_ADJUST_CFA_OFFSET -4
        movl %eax, %esp
+#else
+       movl %esp, %eax
+#endif
        xorl %edx, %edx
        call do_notify_resume
        jmp resume_userspace_sig
-#endif
 
        # perform syscall exit tracing
        ALIGN