Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6865
b: refs/heads/master
c: bce5f6b
h: refs/heads/master
i:
  6863: 08505f3
v: v3
  • Loading branch information
Martin Hicks authored and Linus Torvalds committed Sep 5, 2005
1 parent 14cfbec commit f8b92ec
Show file tree
Hide file tree
Showing 3 changed files with 5 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: 242e54686257493f0b10ac557e730419d9af7d24
refs/heads/master: bce5f6ba340b09d8b29902add204bb95a6d3d88b
1 change: 1 addition & 0 deletions trunk/include/linux/capability.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ typedef __u32 kernel_cap_t;
/* Allow enabling/disabling tagged queuing on SCSI controllers and sending
arbitrary SCSI commands */
/* Allow setting encryption key on loopback filesystem */
/* Allow setting zone reclaim policy */

#define CAP_SYS_ADMIN 21

Expand Down
3 changes: 3 additions & 0 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,9 @@ asmlinkage long sys_set_zone_reclaim(unsigned int node, unsigned int zone,
struct zone *z;
int i;

if (!capable(CAP_SYS_ADMIN))
return -EACCES;

if (node >= MAX_NUMNODES || !node_online(node))
return -EINVAL;

Expand Down

0 comments on commit f8b92ec

Please sign in to comment.