Thread (61 messages) 61 messages, 9 authors, 2012-04-06

Re: [PATCH 20/40] mn10300: Use set_current_blocked() and block_sigmask()

From: Oleg Nesterov <oleg@redhat.com>
Date: 2012-02-14 17:30:29
Also in: lkml

On 02/14, David Howells wrote:
Matt Fleming [off-list ref] wrote:
quoted
 asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
 {
-	mask &= _BLOCKABLE;
-	spin_lock_irq(&current->sighand->siglock);
+	sigset_t blocked;
+
 	current->saved_sigmask = current->blocked;
Can this line create a race, now that it's not protected by a lock?  It is
possible for current->blocked to get altered by another thread.
No, only current can change ->blocked. This is even documented in
sigprocmask(). And more, the only correct way to change ->blocked
is set_current_blocked(). OK, with a couple of "I know what I am
doing" exceptions in kernel/signal.c.

Oleg.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help