diff options
-rw-r--r-- | arch/x86/kernel/signal_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 9eb23fb66b1e..47c85e6b14bb 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -214,11 +214,12 @@ badframe: | |||
214 | 214 | ||
215 | asmlinkage int sys_rt_sigreturn(unsigned long __unused) | 215 | asmlinkage int sys_rt_sigreturn(unsigned long __unused) |
216 | { | 216 | { |
217 | struct pt_regs *regs = (struct pt_regs *) &__unused; | 217 | struct pt_regs *regs = (struct pt_regs *)&__unused; |
218 | struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->sp - 4); | 218 | struct rt_sigframe __user *frame; |
219 | sigset_t set; | 219 | sigset_t set; |
220 | int ax; | 220 | int ax; |
221 | 221 | ||
222 | frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long)); | ||
222 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 223 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
223 | goto badframe; | 224 | goto badframe; |
224 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 225 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index b7d7a6d5c26b..1045a07eeaec 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -133,13 +133,11 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
133 | sigset_t set; | 133 | sigset_t set; |
134 | unsigned long ax; | 134 | unsigned long ax; |
135 | 135 | ||
136 | frame = (struct rt_sigframe __user *)(regs->sp - 8); | 136 | frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long)); |
137 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) { | 137 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
138 | goto badframe; | 138 | goto badframe; |
139 | } | 139 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
140 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) { | ||
141 | goto badframe; | 140 | goto badframe; |
142 | } | ||
143 | 141 | ||
144 | sigdelsetmask(&set, ~_BLOCKABLE); | 142 | sigdelsetmask(&set, ~_BLOCKABLE); |
145 | spin_lock_irq(¤t->sighand->siglock); | 143 | spin_lock_irq(¤t->sighand->siglock); |