aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-27 13:58:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:51 -0400
commit77097ae503b170120ab66dd1d547f8577193f91f (patch)
treebee5b2e8d91b9ec8ab74c58cbec1796c7bacc2e5 /arch/sparc/kernel
parentedd63a2763bdae0daa4f0a4d4c5d61d1154352a5 (diff)
most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set
Only 3 out of 63 do not. Renamed the current variant to __set_current_blocked(), added set_current_blocked() that will exclude unblockable signals, switched open-coded instances to it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/signal32.c4
-rw-r--r--arch/sparc/kernel/signal_32.c4
-rw-r--r--arch/sparc/kernel/signal_64.c4
3 files changed, 0 insertions, 12 deletions
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c
index 8c93c00922a7..ba3dbfcdb28e 100644
--- a/arch/sparc/kernel/signal32.c
+++ b/arch/sparc/kernel/signal32.c
@@ -32,8 +32,6 @@
32 32
33#include "sigutil.h" 33#include "sigutil.h"
34 34
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
36
37/* This magic should be in g_upper[0] for all upper parts 35/* This magic should be in g_upper[0] for all upper parts
38 * to be valid. 36 * to be valid.
39 */ 37 */
@@ -274,7 +272,6 @@ void do_sigreturn32(struct pt_regs *regs)
274 case 2: set.sig[1] = seta[2] + (((long)seta[3]) << 32); 272 case 2: set.sig[1] = seta[2] + (((long)seta[3]) << 32);
275 case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32); 273 case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32);
276 } 274 }
277 sigdelsetmask(&set, ~_BLOCKABLE);
278 set_current_blocked(&set); 275 set_current_blocked(&set);
279 return; 276 return;
280 277
@@ -376,7 +373,6 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs)
376 case 2: set.sig[1] = seta.sig[2] + (((long)seta.sig[3]) << 32); 373 case 2: set.sig[1] = seta.sig[2] + (((long)seta.sig[3]) << 32);
377 case 1: set.sig[0] = seta.sig[0] + (((long)seta.sig[1]) << 32); 374 case 1: set.sig[0] = seta.sig[0] + (((long)seta.sig[1]) << 32);
378 } 375 }
379 sigdelsetmask(&set, ~_BLOCKABLE);
380 set_current_blocked(&set); 376 set_current_blocked(&set);
381 return; 377 return;
382segv: 378segv:
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c
index f6722427203d..1bfa854be602 100644
--- a/arch/sparc/kernel/signal_32.c
+++ b/arch/sparc/kernel/signal_32.c
@@ -29,8 +29,6 @@
29 29
30#include "sigutil.h" 30#include "sigutil.h"
31 31
32#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
33
34extern void fpsave(unsigned long *fpregs, unsigned long *fsr, 32extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
35 void *fpqueue, unsigned long *fpqdepth); 33 void *fpqueue, unsigned long *fpqdepth);
36extern void fpload(unsigned long *fpregs, unsigned long *fsr); 34extern void fpload(unsigned long *fpregs, unsigned long *fsr);
@@ -130,7 +128,6 @@ asmlinkage void do_sigreturn(struct pt_regs *regs)
130 if (err) 128 if (err)
131 goto segv_and_exit; 129 goto segv_and_exit;
132 130
133 sigdelsetmask(&set, ~_BLOCKABLE);
134 set_current_blocked(&set); 131 set_current_blocked(&set);
135 return; 132 return;
136 133
@@ -197,7 +194,6 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
197 goto segv; 194 goto segv;
198 } 195 }
199 196
200 sigdelsetmask(&set, ~_BLOCKABLE);
201 set_current_blocked(&set); 197 set_current_blocked(&set);
202 return; 198 return;
203segv: 199segv:
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c
index febbc4b697ba..23b60caa6c43 100644
--- a/arch/sparc/kernel/signal_64.c
+++ b/arch/sparc/kernel/signal_64.c
@@ -38,8 +38,6 @@
38#include "systbls.h" 38#include "systbls.h"
39#include "sigutil.h" 39#include "sigutil.h"
40 40
41#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
42
43/* {set, get}context() needed for 64-bit SparcLinux userland. */ 41/* {set, get}context() needed for 64-bit SparcLinux userland. */
44asmlinkage void sparc64_set_context(struct pt_regs *regs) 42asmlinkage void sparc64_set_context(struct pt_regs *regs)
45{ 43{
@@ -71,7 +69,6 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
71 if (__copy_from_user(&set, &ucp->uc_sigmask, sizeof(sigset_t))) 69 if (__copy_from_user(&set, &ucp->uc_sigmask, sizeof(sigset_t)))
72 goto do_sigsegv; 70 goto do_sigsegv;
73 } 71 }
74 sigdelsetmask(&set, ~_BLOCKABLE);
75 set_current_blocked(&set); 72 set_current_blocked(&set);
76 } 73 }
77 if (test_thread_flag(TIF_32BIT)) { 74 if (test_thread_flag(TIF_32BIT)) {
@@ -315,7 +312,6 @@ void do_rt_sigreturn(struct pt_regs *regs)
315 /* Prevent syscall restart. */ 312 /* Prevent syscall restart. */
316 pt_regs_clear_syscall(regs); 313 pt_regs_clear_syscall(regs);
317 314
318 sigdelsetmask(&set, ~_BLOCKABLE);
319 set_current_blocked(&set); 315 set_current_blocked(&set);
320 return; 316 return;
321segv: 317segv: