diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-01-14 02:46:14 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 04:32:36 +0300 |
commit | 1e50df39f6e2c3a4a3394df62baa8a213df16c54 (patch) | |
tree | d437981aec4fc5cf84178f7afcca83f0ef40aea1 /mm/mempolicy.c | |
parent | 53a7706d5ed8f1a53ba062b318773160cc476dde (diff) | |
download | linux-1e50df39f6e2c3a4a3394df62baa8a213df16c54.tar.xz |
mempolicy: remove tasklist_lock from migrate_pages
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 <kosaki.motohiro@jp.fujitsu.com>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 7ee55af8d79c..e6d351265aed 100644 --- 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; |