mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 09:02:17 +00:00
x86: use sizeof(long) to unify signal_32|64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
1a1768039c
commit
2d19c45806
@ -214,11 +214,12 @@ badframe:
|
||||
|
||||
asmlinkage int sys_rt_sigreturn(unsigned long __unused)
|
||||
{
|
||||
struct pt_regs *regs = (struct pt_regs *) &__unused;
|
||||
struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->sp - 4);
|
||||
struct pt_regs *regs = (struct pt_regs *)&__unused;
|
||||
struct rt_sigframe __user *frame;
|
||||
sigset_t set;
|
||||
int ax;
|
||||
|
||||
frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
|
||||
if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
|
||||
goto badframe;
|
||||
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
|
||||
|
@ -133,13 +133,11 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
|
||||
sigset_t set;
|
||||
unsigned long ax;
|
||||
|
||||
frame = (struct rt_sigframe __user *)(regs->sp - 8);
|
||||
if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) {
|
||||
frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
|
||||
if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
|
||||
goto badframe;
|
||||
}
|
||||
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) {
|
||||
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
|
||||
goto badframe;
|
||||
}
|
||||
|
||||
sigdelsetmask(&set, ~_BLOCKABLE);
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
|
Loading…
Reference in New Issue
Block a user