Commit 438e91da authored by Andreas Larsson's avatar Andreas Larsson Committed by Greg Kroah-Hartman

sparc32: Fix inverted invalid_frame_pointer checks on sigreturns

[ Upstream commit 07b5ab3f ]
Signed-off-by: default avatarAndreas Larsson <andreas@gaisler.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 06cdad2b
...@@ -89,7 +89,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs) ...@@ -89,7 +89,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs)
sf = (struct signal_frame __user *) regs->u_regs[UREG_FP]; sf = (struct signal_frame __user *) regs->u_regs[UREG_FP];
/* 1. Make sure we are not getting garbage from the user */ /* 1. Make sure we are not getting garbage from the user */
if (!invalid_frame_pointer(sf, sizeof(*sf))) if (invalid_frame_pointer(sf, sizeof(*sf)))
goto segv_and_exit; goto segv_and_exit;
if (get_user(ufp, &sf->info.si_regs.u_regs[UREG_FP])) if (get_user(ufp, &sf->info.si_regs.u_regs[UREG_FP]))
...@@ -150,7 +150,7 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs) ...@@ -150,7 +150,7 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
synchronize_user_stack(); synchronize_user_stack();
sf = (struct rt_signal_frame __user *) regs->u_regs[UREG_FP]; sf = (struct rt_signal_frame __user *) regs->u_regs[UREG_FP];
if (!invalid_frame_pointer(sf, sizeof(*sf))) if (invalid_frame_pointer(sf, sizeof(*sf)))
goto segv; goto segv;
if (get_user(ufp, &sf->regs.u_regs[UREG_FP])) if (get_user(ufp, &sf->regs.u_regs[UREG_FP]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment