Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24569
b: refs/heads/master
c: 88531f7
h: refs/heads/master
i:
  24567: 94d0952
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 29, 2006
1 parent 89e4916 commit 82db7a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aacc90944d4b1f2fcec73a8127eb60a3a701ce1c
refs/heads/master: 88531f725bd52e37a7be726860e4ff3f09031d89
22 changes: 3 additions & 19 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,8 +2301,7 @@ sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo)
return kill_proc_info(sig, &info, pid);
}

int
do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
{
struct k_sigaction *k;
sigset_t mask;
Expand All @@ -2328,6 +2327,7 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
if (act) {
sigdelsetmask(&act->sa.sa_mask,
sigmask(SIGKILL) | sigmask(SIGSTOP));
*k = *act;
/*
* POSIX 3.3.1.3:
* "Setting a signal action to SIG_IGN for a signal that is
Expand All @@ -2340,19 +2340,8 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
* be discarded, whether or not it is blocked"
*/
if (act->sa.sa_handler == SIG_IGN ||
(act->sa.sa_handler == SIG_DFL &&
sig_kernel_ignore(sig))) {
/*
* This is a fairly rare case, so we only take the
* tasklist_lock once we're sure we'll need it.
* Now we must do this little unlock and relock
* dance to maintain the lock hierarchy.
*/
(act->sa.sa_handler == SIG_DFL && sig_kernel_ignore(sig))) {
struct task_struct *t = current;
spin_unlock_irq(&t->sighand->siglock);
read_lock(&tasklist_lock);
spin_lock_irq(&t->sighand->siglock);
*k = *act;
sigemptyset(&mask);
sigaddset(&mask, sig);
rm_from_queue_full(&mask, &t->signal->shared_pending);
Expand All @@ -2361,12 +2350,7 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
recalc_sigpending_tsk(t);
t = next_thread(t);
} while (t != current);
spin_unlock_irq(&current->sighand->siglock);
read_unlock(&tasklist_lock);
return 0;
}

*k = *act;
}

spin_unlock_irq(&current->sighand->siglock);
Expand Down

0 comments on commit 82db7a2

Please sign in to comment.