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>
This commit is contained in:
@@ -33,9 +33,6 @@
|
||||
#include <asm/switch_to.h>
|
||||
#include "entry.h"
|
||||
|
||||
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
__u8 callee_used_stack[__SIGNAL_FRAMESIZE];
|
||||
@@ -169,7 +166,6 @@ SYSCALL_DEFINE0(sigreturn)
|
||||
goto badframe;
|
||||
if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE))
|
||||
goto badframe;
|
||||
sigdelsetmask(&set, ~_BLOCKABLE);
|
||||
set_current_blocked(&set);
|
||||
if (restore_sigregs(regs, &frame->sregs))
|
||||
goto badframe;
|
||||
@@ -189,7 +185,6 @@ SYSCALL_DEFINE0(rt_sigreturn)
|
||||
goto badframe;
|
||||
if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set)))
|
||||
goto badframe;
|
||||
sigdelsetmask(&set, ~_BLOCKABLE);
|
||||
set_current_blocked(&set);
|
||||
if (restore_sigregs(regs, &frame->uc.uc_mcontext))
|
||||
goto badframe;
|
||||
|
Reference in New Issue
Block a user