summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-09-29 02:00:55 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:18 -0700
commitaaa2a97eb9c0e91d7abc66bf76811a9599fdb3ee (patch)
tree90d45393fe0116e53412f8f8afa4e8b538177832
parentd359b549bf3d7f42f0084918a4816ea4572e507c (diff)
[PATCH] sys_get_robust_list(): don't take tasklist_lock
use rcu locks for find_task_by_pid(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/futex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index ca8ef11feb65..4b6770e9806d 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1624,7 +1624,7 @@ sys_get_robust_list(int pid, struct robust_list_head __user **head_ptr,
struct task_struct *p;
ret = -ESRCH;
- read_lock(&tasklist_lock);
+ rcu_read_lock();
p = find_task_by_pid(pid);
if (!p)
goto err_unlock;
@@ -1633,7 +1633,7 @@ sys_get_robust_list(int pid, struct robust_list_head __user **head_ptr,
!capable(CAP_SYS_PTRACE))
goto err_unlock;
head = p->robust_list;
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
}
if (put_user(sizeof(*head), len_ptr))
@@ -1641,7 +1641,7 @@ sys_get_robust_list(int pid, struct robust_list_head __user **head_ptr,
return put_user(head, head_ptr);
err_unlock:
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
return ret;
}