aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/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/s390/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/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_signal.c4
-rw-r--r--arch/s390/kernel/signal.c5
2 files changed, 0 insertions, 9 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 233db1d68eee..923baa96c0b0 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -32,8 +32,6 @@
32#include "compat_ptrace.h" 32#include "compat_ptrace.h"
33#include "entry.h" 33#include "entry.h"
34 34
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
36
37typedef struct 35typedef struct
38{ 36{
39 __u8 callee_used_stack[__SIGNAL_FRAMESIZE32]; 37 __u8 callee_used_stack[__SIGNAL_FRAMESIZE32];
@@ -364,7 +362,6 @@ asmlinkage long sys32_sigreturn(void)
364 goto badframe; 362 goto badframe;
365 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) 363 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32))
366 goto badframe; 364 goto badframe;
367 sigdelsetmask(&set, ~_BLOCKABLE);
368 set_current_blocked(&set); 365 set_current_blocked(&set);
369 if (restore_sigregs32(regs, &frame->sregs)) 366 if (restore_sigregs32(regs, &frame->sregs))
370 goto badframe; 367 goto badframe;
@@ -390,7 +387,6 @@ asmlinkage long sys32_rt_sigreturn(void)
390 goto badframe; 387 goto badframe;
391 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 388 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
392 goto badframe; 389 goto badframe;
393 sigdelsetmask(&set, ~_BLOCKABLE);
394 set_current_blocked(&set); 390 set_current_blocked(&set);
395 if (restore_sigregs32(regs, &frame->uc.uc_mcontext)) 391 if (restore_sigregs32(regs, &frame->uc.uc_mcontext))
396 goto badframe; 392 goto badframe;
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 7f9a862a161a..8332a6943384 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -33,9 +33,6 @@
33#include <asm/switch_to.h> 33#include <asm/switch_to.h>
34#include "entry.h" 34#include "entry.h"
35 35
36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
37
38
39typedef struct 36typedef struct
40{ 37{
41 __u8 callee_used_stack[__SIGNAL_FRAMESIZE]; 38 __u8 callee_used_stack[__SIGNAL_FRAMESIZE];
@@ -169,7 +166,6 @@ SYSCALL_DEFINE0(sigreturn)
169 goto badframe; 166 goto badframe;
170 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE)) 167 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE))
171 goto badframe; 168 goto badframe;
172 sigdelsetmask(&set, ~_BLOCKABLE);
173 set_current_blocked(&set); 169 set_current_blocked(&set);
174 if (restore_sigregs(regs, &frame->sregs)) 170 if (restore_sigregs(regs, &frame->sregs))
175 goto badframe; 171 goto badframe;
@@ -189,7 +185,6 @@ SYSCALL_DEFINE0(rt_sigreturn)
189 goto badframe; 185 goto badframe;
190 if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set))) 186 if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set)))
191 goto badframe; 187 goto badframe;
192 sigdelsetmask(&set, ~_BLOCKABLE);
193 set_current_blocked(&set); 188 set_current_blocked(&set);
194 if (restore_sigregs(regs, &frame->uc.uc_mcontext)) 189 if (restore_sigregs(regs, &frame->uc.uc_mcontext))
195 goto badframe; 190 goto badframe;