Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

signals: set_current_blocked() can use __set_current_blocked()

Cleanup. And I think we need more cleanups, in particular
__set_current_blocked() and sigprocmask() should die. Nobody should
ever block SIGKILL or SIGSTOP.

- Change set_current_blocked() to use __set_current_blocked()

- Change sys_sigprocmask() to use set_current_blocked(), this way it
should not worry about SIGKILL/SIGSTOP.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Oleg Nesterov and committed by
Linus Torvalds
0c4a8423 5ba53ff6

+2 -6
+2 -6
kernel/signal.c
··· 2528 2528 */ 2529 2529 void set_current_blocked(sigset_t *newset) 2530 2530 { 2531 - struct task_struct *tsk = current; 2532 2531 sigdelsetmask(newset, sigmask(SIGKILL) | sigmask(SIGSTOP)); 2533 - spin_lock_irq(&tsk->sighand->siglock); 2534 - __set_task_blocked(tsk, newset); 2535 - spin_unlock_irq(&tsk->sighand->siglock); 2532 + __set_current_blocked(newset); 2536 2533 } 2537 2534 2538 2535 void __set_current_blocked(const sigset_t *newset) ··· 3201 3204 if (nset) { 3202 3205 if (copy_from_user(&new_set, nset, sizeof(*nset))) 3203 3206 return -EFAULT; 3204 - new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP)); 3205 3207 3206 3208 new_blocked = current->blocked; 3207 3209 ··· 3218 3222 return -EINVAL; 3219 3223 } 3220 3224 3221 - __set_current_blocked(&new_blocked); 3225 + set_current_blocked(&new_blocked); 3222 3226 } 3223 3227 3224 3228 if (oset) {