Commit 13fbcb731220341537131b32cf01b1e70df7206d

Authored by Oleg Nesterov
Committed by Linus Torvalds
1 parent 6db840fa78

do_sigaction: don't worry about signal_pending()

do_sigaction() returns -ERESTARTNOINTR if signal_pending(). The comment says:

	* If there might be a fatal signal pending on multiple
	* threads, make sure we take it before changing the action.

I think this is not needed. We should only worry about SIGNAL_GROUP_EXIT case,
bit it implies a pending SIGKILL which can't be cleared by do_sigaction.

Kill this special case.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 0 additions and 9 deletions Side-by-side Diff

... ... @@ -2294,15 +2294,6 @@
2294 2294 k = &current->sighand->action[sig-1];
2295 2295  
2296 2296 spin_lock_irq(&current->sighand->siglock);
2297   - if (signal_pending(current)) {
2298   - /*
2299   - * If there might be a fatal signal pending on multiple
2300   - * threads, make sure we take it before changing the action.
2301   - */
2302   - spin_unlock_irq(&current->sighand->siglock);
2303   - return -ERESTARTNOINTR;
2304   - }
2305   -
2306 2297 if (oact)
2307 2298 *oact = *k;
2308 2299