Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28959
b: refs/heads/master
c: 86c3a76
h: refs/heads/master
i:
  28957: 819cd35
  28955: 6bf30db
  28951: 312cc2f
  28943: 654a55d
  28927: ebe0d11
v: v3
  • Loading branch information
David Quigley authored and Linus Torvalds committed Jun 23, 2006
1 parent 324c5d7 commit ee39a36
Show file tree
Hide file tree
Showing 3 changed files with 12 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: 35601547baf92d984b6e59cf3583649da04baea5
refs/heads/master: 86c3a7645c05a7d06b72653aa4b2bea4e7229d1b
5 changes: 5 additions & 0 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include <linux/proc_fs.h>
#include <linux/migrate.h>
#include <linux/rmap.h>
#include <linux/security.h>

#include <asm/tlbflush.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -942,6 +943,10 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
goto out;
}

err = security_task_movememory(task);
if (err)
goto out;

err = do_migrate_pages(mm, &old, &new,
capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
out:
Expand Down
6 changes: 6 additions & 0 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/writeback.h>
#include <linux/mempolicy.h>
#include <linux/vmalloc.h>
#include <linux/security.h>

#include "internal.h"

Expand Down Expand Up @@ -905,6 +906,11 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
goto out2;
}

err = security_task_movememory(task);
if (err)
goto out2;


task_nodes = cpuset_mems_allowed(task);

/* Limit nr_pages so that the multiplication may not overflow */
Expand Down

0 comments on commit ee39a36

Please sign in to comment.