aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMartin Hicks <mort@sgi.com>2005-09-03 18:54:50 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:05:44 -0400
commitbce5f6ba340b09d8b29902add204bb95a6d3d88b (patch)
tree1cfeea969fa5848f0a8d31394829aec5c8571a79 /mm
parent242e54686257493f0b10ac557e730419d9af7d24 (diff)
[PATCH] VM: add capabilites check to set_zone_reclaim
Add a capability check to sys_set_zone_reclaim(). This syscall is not something that should be available to a user. Signed-off-by: Martin Hicks <mort@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index cfffe5098d53..ab631a3c62c3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1375,6 +1375,9 @@ asmlinkage long sys_set_zone_reclaim(unsigned int node, unsigned int zone,
1375 struct zone *z; 1375 struct zone *z;
1376 int i; 1376 int i;
1377 1377
1378 if (!capable(CAP_SYS_ADMIN))
1379 return -EACCES;
1380
1378 if (node >= MAX_NUMNODES || !node_online(node)) 1381 if (node >= MAX_NUMNODES || !node_online(node))
1379 return -EINVAL; 1382 return -EINVAL;
1380 1383