projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53a7706
)
mempolicy: remove tasklist_lock from migrate_pages
author
KOSAKI Motohiro
<
[email protected]
>
Thu, 13 Jan 2011 23:46:14 +0000
(15:46 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 14 Jan 2011 01:32:36 +0000
(17:32 -0800)
Today, tasklist_lock in migrate_pages doesn't protect anything.
rcu_read_lock() provide enough protection from pid hash walk.
Signed-off-by: KOSAKI Motohiro <
[email protected]
>
Reported-by: Peter Zijlstra <
[email protected]
>
Cc: Christoph Lameter <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/mempolicy.c
patch
|
blob
|
history
diff --git
a/mm/mempolicy.c
b/mm/mempolicy.c
index 7ee55af8d79cb120c9f9209c5b37f36a369d26c4..e6d351265aede4c598fe70ee6a9586c1a0e91e92 100644
(file)
--- a/
mm/mempolicy.c
+++ b/
mm/mempolicy.c
@@
-1310,16
+1310,13
@@
SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
/* Find the mm_struct */
rcu_read_lock();
- read_lock(&tasklist_lock);
task = pid ? find_task_by_vpid(pid) : current;
if (!task) {
- read_unlock(&tasklist_lock);
rcu_read_unlock();
err = -ESRCH;
goto out;
}
mm = get_task_mm(task);
- read_unlock(&tasklist_lock);
rcu_read_unlock();
err = -EINVAL;