Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47512
b: refs/heads/master
c: 0c12b51
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Feb 11, 2007
1 parent e78b2a2 commit 18f5eee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: b963a8441cb95999c97bea379607071a869c65f0
refs/heads/master: 0c12b51712ced2c0d89a8ec3d546ed810f86d33e
9 changes: 4 additions & 5 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,19 +1119,18 @@ kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
{
int error;
int acquired_tasklist_lock = 0;
struct task_struct *p;

rcu_read_lock();
if (unlikely(sig_needs_tasklist(sig))) {
if (unlikely(sig_needs_tasklist(sig)))
read_lock(&tasklist_lock);
acquired_tasklist_lock = 1;
}

p = pid_task(pid, PIDTYPE_PID);
error = -ESRCH;
if (p)
error = group_send_sig_info(sig, info, p);
if (unlikely(acquired_tasklist_lock))

if (unlikely(sig_needs_tasklist(sig)))
read_unlock(&tasklist_lock);
rcu_read_unlock();
return error;
Expand Down

0 comments on commit 18f5eee

Please sign in to comment.