* [PATCH] kill_pid_info: kill acquired_tasklist_lock
@ 2006-12-16 20:23 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2006-12-16 20:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: Eric W. Biederman, linux-kernel
Kill acquired_tasklist_lock, sig_needs_tasklist() is very cheap nowadays.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- eric-mm1/kernel/signal.c~3_kpi 2006-12-16 22:22:48.000000000 +0300
+++ eric-mm1/kernel/signal.c 2006-12-16 23:14:05.000000000 +0300
@@ -1247,19 +1247,18 @@ int kill_pgrp_info(int sig, struct sigin
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-16 20:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-16 20:23 [PATCH] kill_pid_info: kill acquired_tasklist_lock Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®