Skip to content

Commit

Permalink
do_sigaction: don't worry about signal_pending()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 17, 2007
1 parent 6db840f commit 13fbcb7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2294,15 +2294,6 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
k = &current->sighand->action[sig-1];

spin_lock_irq(&current->sighand->siglock);
if (signal_pending(current)) {
/*
* If there might be a fatal signal pending on multiple
* threads, make sure we take it before changing the action.
*/
spin_unlock_irq(&current->sighand->siglock);
return -ERESTARTNOINTR;
}

if (oact)
*oact = *k;

Expand Down

0 comments on commit 13fbcb7

Please sign in to comment.