diff options
author | Christoph Lameter <clameter@engr.sgi.com> | 2006-02-28 19:58:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-28 23:53:43 -0500 |
commit | 511030bcd24119fa3759ef3f914d354e107ef839 (patch) | |
tree | 707edb2c804ad6c42ffbd0ef6685b49e076f0dcd /mm/mempolicy.c | |
parent | 5cf6c541f5b3902bdcc2d311d70f8e730aaff1be (diff) |
[PATCH] Fix sys_migrate_pages: Move all pages when invoked from root
Currently sys_migrate_pages only moves pages belonging to a process. This
is okay when invoked from a regular user. But if invoked from root it
should move all pages as documented in the migrate_pages manpage.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 67af4cea1e23..5643cfed6b0f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -954,7 +954,8 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, | |||
954 | goto out; | 954 | goto out; |
955 | } | 955 | } |
956 | 956 | ||
957 | err = do_migrate_pages(mm, &old, &new, MPOL_MF_MOVE); | 957 | err = do_migrate_pages(mm, &old, &new, |
958 | capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); | ||
958 | out: | 959 | out: |
959 | mmput(mm); | 960 | mmput(mm); |
960 | return err; | 961 | return err; |