提交 2d19c458 编写于 作者: H Harvey Harrison 提交者: Ingo Molnar

x86: use sizeof(long) to unify signal_32|64.c

Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 1a176803
...@@ -214,11 +214,12 @@ asmlinkage int sys_sigreturn(unsigned long __unused) ...@@ -214,11 +214,12 @@ asmlinkage int sys_sigreturn(unsigned long __unused)
asmlinkage int sys_rt_sigreturn(unsigned long __unused) asmlinkage int sys_rt_sigreturn(unsigned long __unused)
{ {
struct pt_regs *regs = (struct pt_regs *) &__unused; struct pt_regs *regs = (struct pt_regs *)&__unused;
struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->sp - 4); struct rt_sigframe __user *frame;
sigset_t set; sigset_t set;
int ax; int ax;
frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe; goto badframe;
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
......
...@@ -133,13 +133,11 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) ...@@ -133,13 +133,11 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
sigset_t set; sigset_t set;
unsigned long ax; unsigned long ax;
frame = (struct rt_sigframe __user *)(regs->sp - 8); frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) { if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe; 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; goto badframe;
}
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock); spin_lock_irq(&current->sighand->siglock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册