From akpm@osdl.org Fri Feb 24 17:17:35 2006
Date: Fri, 24 Feb 2006 17:19:34 -0800
From: akpm@osdl.org
To: clameter@engr.sgi.com, ak@muc.de, clameter@sgi.com, mm-commits@vger.kernel.org
Subject: + fix-sys_migrate_pages-move-all-pages-when-invoked-from-root.patch added to -mm tree


The patch titled

     Fix sys_migrate_pages: Move all pages when invoked from root

has been added to the -mm tree.  Its filename is

     fix-sys_migrate_pages-move-all-pages-when-invoked-from-root.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Christoph Lameter <clameter@engr.sgi.com>

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>
---

 mm/mempolicy.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN mm/mempolicy.c~fix-sys_migrate_pages-move-all-pages-when-invoked-from-root mm/mempolicy.c
--- 25/mm/mempolicy.c~fix-sys_migrate_pages-move-all-pages-when-invoked-from-root	Fri Feb 24 17:19:21 2006
+++ 25-akpm/mm/mempolicy.c	Fri Feb 24 17:19:21 2006
@@ -954,7 +954,8 @@ asmlinkage long sys_migrate_pages(pid_t 
 		goto out;
 	}
 
-	err = do_migrate_pages(mm, &old, &new, MPOL_MF_MOVE);
+	err = do_migrate_pages(mm, &old, &new,
+		capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
 out:
 	mmput(mm);
 	return err;
_

Patches currently in -mm which might be from clameter@engr.sgi.com are

linus.patch
page-migration-fix-mpol_interleave-behavior-for-migration-via.patch
vmscan-fix-zone_reclaim.patch
fix-sys_migrate_pages-move-all-pages-when-invoked-from-root.patch
slab-remove-slab_no_reap-option.patch
slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages.patch
slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages-fix.patch
thin-out-scan_control-remove-nr_to_scan-and-priority.patch
zone_reclaim-additional-comments-and-cleanup.patch
vmscan-remove-obsolete-checks-from-shrink_list-and-fix-unlikely-in-refill_inactive-zone.patch
page-migration-fail-if-page-is-in-a-vma-flagged-vm_locked.patch
cpusets-only-wakeup-kswapd-for-zones-in-the-current-cpuset.patch
time_interpolator-use-readq_relaxed-instead-of-readq.patch

