aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/process.c10
-rw-r--r--arch/mips/kernel/signal.c26
-rw-r--r--arch/mips/kernel/signal32.c16
-rw-r--r--arch/mips/kernel/signal_n32.c5
4 files changed, 32 insertions, 25 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 98432097a86a..4fe3d5715c41 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -62,9 +62,9 @@ extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
62/* 62/*
63 * Native o32 and N64 ABI without DSP ASE 63 * Native o32 and N64 ABI without DSP ASE
64 */ 64 */
65extern void setup_frame(struct k_sigaction * ka, struct pt_regs *regs, 65extern int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
66 int signr, sigset_t *set); 66 int signr, sigset_t *set);
67extern void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, 67extern int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
68 int signr, sigset_t *set, siginfo_t *info); 68 int signr, sigset_t *set, siginfo_t *info);
69 69
70struct mips_abi mips_abi = { 70struct mips_abi mips_abi = {
@@ -79,9 +79,9 @@ struct mips_abi mips_abi = {
79/* 79/*
80 * o32 compatibility on 64-bit kernels, without DSP ASE 80 * o32 compatibility on 64-bit kernels, without DSP ASE
81 */ 81 */
82extern void setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, 82extern int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
83 int signr, sigset_t *set); 83 int signr, sigset_t *set);
84extern void setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, 84extern int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
85 int signr, sigset_t *set, siginfo_t *info); 85 int signr, sigset_t *set, siginfo_t *info);
86 86
87struct mips_abi mips_abi_32 = { 87struct mips_abi mips_abi_32 = {
@@ -95,7 +95,7 @@ struct mips_abi mips_abi_32 = {
95/* 95/*
96 * N32 on 64-bit kernels, without DSP ASE 96 * N32 on 64-bit kernels, without DSP ASE
97 */ 97 */
98extern void setup_rt_frame_n32(struct k_sigaction * ka, struct pt_regs *regs, 98extern int setup_rt_frame_n32(struct k_sigaction * ka, struct pt_regs *regs,
99 int signr, sigset_t *set, siginfo_t *info); 99 int signr, sigset_t *set, siginfo_t *info);
100 100
101struct mips_abi mips_abi_n32 = { 101struct mips_abi mips_abi_n32 = {
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 8679ccff870e..9202a17db8f7 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -278,7 +278,7 @@ badframe:
278} 278}
279 279
280#ifdef CONFIG_TRAD_SIGNALS 280#ifdef CONFIG_TRAD_SIGNALS
281void setup_frame(struct k_sigaction * ka, struct pt_regs *regs, 281int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
282 int signr, sigset_t *set) 282 int signr, sigset_t *set)
283{ 283{
284 struct sigframe *frame; 284 struct sigframe *frame;
@@ -317,14 +317,15 @@ void setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
317 current->comm, current->pid, 317 current->comm, current->pid,
318 frame, regs->cp0_epc, frame->regs[31]); 318 frame, regs->cp0_epc, frame->regs[31]);
319#endif 319#endif
320 return; 320 return 1;
321 321
322give_sigsegv: 322give_sigsegv:
323 force_sigsegv(signr, current); 323 force_sigsegv(signr, current);
324 return 0;
324} 325}
325#endif 326#endif
326 327
327void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, 328int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
328 int signr, sigset_t *set, siginfo_t *info) 329 int signr, sigset_t *set, siginfo_t *info)
329{ 330{
330 struct rt_sigframe *frame; 331 struct rt_sigframe *frame;
@@ -376,18 +377,21 @@ void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
376 current->comm, current->pid, 377 current->comm, current->pid,
377 frame, regs->cp0_epc, regs->regs[31]); 378 frame, regs->cp0_epc, regs->regs[31]);
378#endif 379#endif
379 return; 380 return 1;
380 381
381give_sigsegv: 382give_sigsegv:
382 force_sigsegv(signr, current); 383 force_sigsegv(signr, current);
384 return 0;
383} 385}
384 386
385extern void setup_rt_frame_n32(struct k_sigaction * ka, 387extern void setup_rt_frame_n32(struct k_sigaction * ka,
386 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info); 388 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info);
387 389
388static inline void handle_signal(unsigned long sig, siginfo_t *info, 390static inline int handle_signal(unsigned long sig, siginfo_t *info,
389 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) 391 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
390{ 392{
393 int ret;
394
391 switch(regs->regs[0]) { 395 switch(regs->regs[0]) {
392 case ERESTART_RESTARTBLOCK: 396 case ERESTART_RESTARTBLOCK:
393 case ERESTARTNOHAND: 397 case ERESTARTNOHAND:
@@ -407,9 +411,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
407 regs->regs[0] = 0; /* Don't deal with this again. */ 411 regs->regs[0] = 0; /* Don't deal with this again. */
408 412
409 if (sig_uses_siginfo(ka)) 413 if (sig_uses_siginfo(ka))
410 current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info); 414 ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info);
411 else 415 else
412 current->thread.abi->setup_frame(ka, regs, sig, oldset); 416 ret = current->thread.abi->setup_frame(ka, regs, sig, oldset);
413 417
414 spin_lock_irq(&current->sighand->siglock); 418 spin_lock_irq(&current->sighand->siglock);
415 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); 419 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
@@ -417,6 +421,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
417 sigaddset(&current->blocked,sig); 421 sigaddset(&current->blocked,sig);
418 recalc_sigpending(); 422 recalc_sigpending();
419 spin_unlock_irq(&current->sighand->siglock); 423 spin_unlock_irq(&current->sighand->siglock);
424
425 return ret;
420} 426}
421 427
422int do_signal(sigset_t *oldset, struct pt_regs *regs) 428int do_signal(sigset_t *oldset, struct pt_regs *regs)
@@ -440,10 +446,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
440 oldset = &current->blocked; 446 oldset = &current->blocked;
441 447
442 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 448 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
443 if (signr > 0) { 449 if (signr > 0)
444 handle_signal(signr, &info, &ka, oldset, regs); 450 return handle_signal(signr, &info, &ka, oldset, regs);
445 return 1;
446 }
447 451
448no_signal: 452no_signal:
449 /* 453 /*
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 806ed073e54d..dbe821303125 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -769,9 +769,11 @@ give_sigsegv:
769 force_sigsegv(signr, current); 769 force_sigsegv(signr, current);
770} 770}
771 771
772static inline void handle_signal(unsigned long sig, siginfo_t *info, 772static inline int handle_signal(unsigned long sig, siginfo_t *info,
773 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs) 773 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs)
774{ 774{
775 int ret;
776
775 switch (regs->regs[0]) { 777 switch (regs->regs[0]) {
776 case ERESTART_RESTARTBLOCK: 778 case ERESTART_RESTARTBLOCK:
777 case ERESTARTNOHAND: 779 case ERESTARTNOHAND:
@@ -791,9 +793,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
791 regs->regs[0] = 0; /* Don't deal with this again. */ 793 regs->regs[0] = 0; /* Don't deal with this again. */
792 794
793 if (ka->sa.sa_flags & SA_SIGINFO) 795 if (ka->sa.sa_flags & SA_SIGINFO)
794 current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info); 796 ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info);
795 else 797 else
796 current->thread.abi->setup_frame(ka, regs, sig, oldset); 798 ret = current->thread.abi->setup_frame(ka, regs, sig, oldset);
797 799
798 spin_lock_irq(&current->sighand->siglock); 800 spin_lock_irq(&current->sighand->siglock);
799 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); 801 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
@@ -801,6 +803,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
801 sigaddset(&current->blocked,sig); 803 sigaddset(&current->blocked,sig);
802 recalc_sigpending(); 804 recalc_sigpending();
803 spin_unlock_irq(&current->sighand->siglock); 805 spin_unlock_irq(&current->sighand->siglock);
806
807 return ret;
804} 808}
805 809
806int do_signal32(sigset_t *oldset, struct pt_regs *regs) 810int do_signal32(sigset_t *oldset, struct pt_regs *regs)
@@ -824,10 +828,8 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
824 oldset = &current->blocked; 828 oldset = &current->blocked;
825 829
826 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 830 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
827 if (signr > 0) { 831 if (signr > 0)
828 handle_signal(signr, &info, &ka, oldset, regs); 832 return handle_signal(signr, &info, &ka, oldset, regs);
829 return 1;
830 }
831 833
832no_signal: 834no_signal:
833 /* 835 /*
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index f47c3aaaec8a..ec61b2670ba6 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -130,7 +130,7 @@ badframe:
130 force_sig(SIGSEGV, current); 130 force_sig(SIGSEGV, current);
131} 131}
132 132
133void setup_rt_frame_n32(struct k_sigaction * ka, 133int setup_rt_frame_n32(struct k_sigaction * ka,
134 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) 134 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info)
135{ 135{
136 struct rt_sigframe_n32 *frame; 136 struct rt_sigframe_n32 *frame;
@@ -184,8 +184,9 @@ void setup_rt_frame_n32(struct k_sigaction * ka,
184 current->comm, current->pid, 184 current->comm, current->pid,
185 frame, regs->cp0_epc, regs->regs[31]); 185 frame, regs->cp0_epc, regs->regs[31]);
186#endif 186#endif
187 return; 187 return 1;
188 188
189give_sigsegv: 189give_sigsegv:
190 force_sigsegv(signr, current); 190 force_sigsegv(signr, current);
191 return 0;
191} 192}