diff options
Diffstat (limited to 'arch/x86/include/asm/ptrace.h')
-rw-r--r-- | arch/x86/include/asm/ptrace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index 19507ffa5d28..5fabf1362942 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h | |||
@@ -107,7 +107,7 @@ static inline unsigned long regs_return_value(struct pt_regs *regs) | |||
107 | static inline int user_mode(struct pt_regs *regs) | 107 | static inline int user_mode(struct pt_regs *regs) |
108 | { | 108 | { |
109 | #ifdef CONFIG_X86_32 | 109 | #ifdef CONFIG_X86_32 |
110 | return (regs->cs & SEGMENT_RPL_MASK) == USER_RPL; | 110 | return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >= USER_RPL; |
111 | #else | 111 | #else |
112 | return !!(regs->cs & 3); | 112 | return !!(regs->cs & 3); |
113 | #endif | 113 | #endif |