diff options
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r-- | arch/x86/kernel/signal_64.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index feff4a91d09..a5c9627f4db 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -69,6 +69,8 @@ static int | |||
69 | restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | 69 | restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, |
70 | unsigned long *pax) | 70 | unsigned long *pax) |
71 | { | 71 | { |
72 | void __user *buf; | ||
73 | unsigned int tmpflags; | ||
72 | unsigned int err = 0; | 74 | unsigned int err = 0; |
73 | 75 | ||
74 | /* Always make any pending restarted system calls return -EINTR */ | 76 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -90,19 +92,12 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | |||
90 | * App's signal handler can save/restore other segments if needed. */ | 92 | * App's signal handler can save/restore other segments if needed. */ |
91 | COPY_SEG_STRICT(cs); | 93 | COPY_SEG_STRICT(cs); |
92 | 94 | ||
93 | { | 95 | err |= __get_user(tmpflags, &sc->flags); |
94 | unsigned int tmpflags; | 96 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); |
95 | err |= __get_user(tmpflags, &sc->flags); | 97 | regs->orig_ax = -1; /* disable syscall checks */ |
96 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); | ||
97 | regs->orig_ax = -1; /* disable syscall checks */ | ||
98 | } | ||
99 | |||
100 | { | ||
101 | void __user *buf; | ||
102 | 98 | ||
103 | err |= __get_user(buf, &sc->fpstate); | 99 | err |= __get_user(buf, &sc->fpstate); |
104 | err |= restore_i387_xstate(buf); | 100 | err |= restore_i387_xstate(buf); |
105 | } | ||
106 | 101 | ||
107 | err |= __get_user(*pax, &sc->ax); | 102 | err |= __get_user(*pax, &sc->ax); |
108 | return err; | 103 | return err; |