Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222864
b: refs/heads/master
c: 55cfaa3
h: refs/heads/master
v: v3
  • Loading branch information
Zeng Zhaoming authored and Linus Torvalds committed Dec 2, 2010
1 parent 68fdc53 commit 629e617
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f64d69c7ad2e48e697493e45590679f7a69b7b2
refs/heads/master: 55cfaa3cbdd29c4919ecb5fb8965c310f357e48c
3 changes: 3 additions & 0 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,15 +1307,18 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
goto out;

/* 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;
if (!mm)
Expand Down

0 comments on commit 629e617

Please sign in to comment.