diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:10:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:10:09 -0700 |
commit | 2fb9e96cada81e7288579e14c3d56f1f969354a5 (patch) | |
tree | acfe7e7a1455f06ce462fdeb22d4755dd9517393 /arch/x86/kernel/entry_32.S | |
parent | 8e3ade251bc7c0a4f0777df4dd34343a03efadba (diff) | |
parent | 29a2e2836ff9ea65a603c89df217f4198973a74f (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull additional x86 fixes from Peter Anvin:
- address a long-standing bug related to when a kernel-spawned process
gets a signal on an i386 kernel compiled without CONFIG_VM86.
- fix the newly introduced build warning in arch/x86/boot.
- fix a typo in the i386 system call table which affects building some
libcs.
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86-32: Fix endless loop when processing signals for kernel tasks
x86, boot: Correct CFLAGS for hostprogs
x86-32: Fix typo for mq_getsetattr in syscall table
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
-rw-r--r-- | arch/x86/kernel/entry_32.S | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 79d97e68f04..7b784f4ef1e 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -98,12 +98,6 @@ #endif .endm -#ifdef CONFIG_VM86 -#define resume_userspace_sig check_userspace -#else -#define resume_userspace_sig resume_userspace -#endif - /* * User gs save/restore * @@ -327,10 +321,19 @@ ret_from_exception: preempt_stop(CLBR_ANY) ret_from_intr: GET_THREAD_INFO(%ebp) -check_userspace: +resume_userspace_sig: +#ifdef CONFIG_VM86 movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS movb PT_CS(%esp), %al andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax +#else + /* + * We can be coming here from a syscall done in the kernel space, + * e.g. a failed kernel_execve(). + */ + movl PT_CS(%esp), %eax + andl $SEGMENT_RPL_MASK, %eax +#endif cmpl $USER_RPL, %eax jb resume_kernel # not returning to v8086 or userspace |