Commit 032e9c06 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Use force_{sig,sigsegv}() in sparc signal handling.

Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 753e80fa
...@@ -274,7 +274,7 @@ static inline void do_new_sigreturn (struct pt_regs *regs) ...@@ -274,7 +274,7 @@ static inline void do_new_sigreturn (struct pt_regs *regs)
return; return;
segv_and_exit: segv_and_exit:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
asmlinkage void do_sigreturn(struct pt_regs *regs) asmlinkage void do_sigreturn(struct pt_regs *regs)
...@@ -341,7 +341,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs) ...@@ -341,7 +341,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs)
return; return;
segv_and_exit: segv_and_exit:
send_sig(SIGSEGV, current, 1); force_sig(SIGSEGV, current);
} }
asmlinkage void do_rt_sigreturn(struct pt_regs *regs) asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
...@@ -401,7 +401,7 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs) ...@@ -401,7 +401,7 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
return; return;
segv: segv:
send_sig(SIGSEGV, current, 1); force_sig(SIGSEGV, current);
} }
/* Checks if the fp is valid */ /* Checks if the fp is valid */
...@@ -549,7 +549,7 @@ setup_frame(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *old ...@@ -549,7 +549,7 @@ setup_frame(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *old
sigill_and_return: sigill_and_return:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signr, current);
} }
...@@ -663,7 +663,7 @@ new_setup_frame(struct k_sigaction *ka, struct pt_regs *regs, ...@@ -663,7 +663,7 @@ new_setup_frame(struct k_sigaction *ka, struct pt_regs *regs,
sigill_and_return: sigill_and_return:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signo, current);
} }
static inline void static inline void
...@@ -746,7 +746,7 @@ new_setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, ...@@ -746,7 +746,7 @@ new_setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
sigill: sigill:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signo, current);
} }
/* Setup a Solaris stack frame */ /* Setup a Solaris stack frame */
...@@ -876,7 +876,7 @@ setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc, ...@@ -876,7 +876,7 @@ setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc,
sigill_and_return: sigill_and_return:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signr, current);
} }
asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs) asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
...@@ -889,7 +889,7 @@ asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs) ...@@ -889,7 +889,7 @@ asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
synchronize_user_stack(); synchronize_user_stack();
if (current_thread_info()->w_saved) if (current_thread_info()->w_saved)
goto sigsegv_and_return; return -EFAULT;
err = clear_user(uc, sizeof(*uc)); err = clear_user(uc, sizeof(*uc));
if (err) if (err)
...@@ -930,9 +930,6 @@ asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs) ...@@ -930,9 +930,6 @@ asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
* we have already stuffed all of it with sync_user_stack * we have already stuffed all of it with sync_user_stack
*/ */
return (err ? -EFAULT : 0); return (err ? -EFAULT : 0);
sigsegv_and_return:
do_exit(SIGSEGV);
} }
/* Set the context for a svr4 application, this is Solaris way to sigreturn */ /* Set the context for a svr4 application, this is Solaris way to sigreturn */
...@@ -1018,7 +1015,7 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs) ...@@ -1018,7 +1015,7 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
return (err ? -EFAULT : 0); return (err ? -EFAULT : 0);
sigsegv_and_return: sigsegv_and_return:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
static inline void static inline void
......
...@@ -135,7 +135,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) ...@@ -135,7 +135,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
return; return;
do_sigsegv: do_sigsegv:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
asmlinkage void sparc64_get_context(struct pt_regs *regs) asmlinkage void sparc64_get_context(struct pt_regs *regs)
...@@ -226,7 +226,7 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs) ...@@ -226,7 +226,7 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs)
return; return;
do_sigsegv: do_sigsegv:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
struct rt_signal_frame { struct rt_signal_frame {
...@@ -439,7 +439,7 @@ void do_rt_sigreturn(struct pt_regs *regs) ...@@ -439,7 +439,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
return; return;
segv: segv:
send_sig(SIGSEGV, current, 1); force_sig(SIGSEGV, current);
} }
/* Checks if the fp is valid */ /* Checks if the fp is valid */
...@@ -565,7 +565,7 @@ setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, ...@@ -565,7 +565,7 @@ setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
sigill: sigill:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signo, current);
} }
static inline void handle_signal(unsigned long signr, struct k_sigaction *ka, static inline void handle_signal(unsigned long signr, struct k_sigaction *ka,
......
...@@ -345,7 +345,7 @@ void do_new_sigreturn32(struct pt_regs *regs) ...@@ -345,7 +345,7 @@ void do_new_sigreturn32(struct pt_regs *regs)
return; return;
segv: segv:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
asmlinkage void do_sigreturn32(struct pt_regs *regs) asmlinkage void do_sigreturn32(struct pt_regs *regs)
...@@ -415,7 +415,7 @@ asmlinkage void do_sigreturn32(struct pt_regs *regs) ...@@ -415,7 +415,7 @@ asmlinkage void do_sigreturn32(struct pt_regs *regs)
return; return;
segv: segv:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) asmlinkage void do_rt_sigreturn32(struct pt_regs *regs)
...@@ -507,7 +507,7 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) ...@@ -507,7 +507,7 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs)
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
return; return;
segv: segv:
do_exit(SIGSEGV); force_sig(SIGSEGV, current);
} }
/* Checks if the fp is valid */ /* Checks if the fp is valid */
...@@ -668,7 +668,7 @@ setup_frame32(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *o ...@@ -668,7 +668,7 @@ setup_frame32(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *o
return; return;
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signr, current);
} }
...@@ -819,7 +819,7 @@ static void new_setup_frame32(struct k_sigaction *ka, struct pt_regs *regs, ...@@ -819,7 +819,7 @@ static void new_setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
sigill: sigill:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signo, current);
} }
/* Setup a Solaris stack frame */ /* Setup a Solaris stack frame */
...@@ -943,7 +943,7 @@ setup_svr4_frame32(struct sigaction *sa, unsigned long pc, unsigned long npc, ...@@ -943,7 +943,7 @@ setup_svr4_frame32(struct sigaction *sa, unsigned long pc, unsigned long npc,
return; return;
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signr, current);
} }
asmlinkage int asmlinkage int
...@@ -1094,7 +1094,7 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs) ...@@ -1094,7 +1094,7 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
return -EINTR; return -EINTR;
sigsegv: sigsegv:
do_exit(SIGSEGV); return -EFAULT;
} }
static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs, static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
...@@ -1233,7 +1233,7 @@ static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs, ...@@ -1233,7 +1233,7 @@ static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
sigill: sigill:
do_exit(SIGILL); do_exit(SIGILL);
sigsegv: sigsegv:
do_exit(SIGSEGV); force_sigsegv(signr, current);
} }
static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka, static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka,
......
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