Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21049
b: refs/heads/master
c: 74c0024
h: refs/heads/master
i:
  21047: b4bb489
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 15, 2006
1 parent fc36516 commit aa55f78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4fb376628e63bfc8071fc915b921da3db4a3385
refs/heads/master: 74c002410548c7cb1744b45d17a5fa21da515b63
8 changes: 4 additions & 4 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ long do_mbind(unsigned long start, unsigned long len,
MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
|| mode > MPOL_MAX)
return -EINVAL;
if ((flags & MPOL_MF_MOVE_ALL) && !capable(CAP_SYS_RESOURCE))
if ((flags & MPOL_MF_MOVE_ALL) && !capable(CAP_SYS_NICE))
return -EPERM;

if (start & ~PAGE_MASK)
Expand Down Expand Up @@ -942,20 +942,20 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
*/
if ((current->euid != task->suid) && (current->euid != task->uid) &&
(current->uid != task->suid) && (current->uid != task->uid) &&
!capable(CAP_SYS_ADMIN)) {
!capable(CAP_SYS_NICE)) {
err = -EPERM;
goto out;
}

task_nodes = cpuset_mems_allowed(task);
/* Is the user allowed to access the target nodes? */
if (!nodes_subset(new, task_nodes) && !capable(CAP_SYS_ADMIN)) {
if (!nodes_subset(new, task_nodes) && !capable(CAP_SYS_NICE)) {
err = -EPERM;
goto out;
}

err = do_migrate_pages(mm, &old, &new,
capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
out:
mmput(mm);
return err;
Expand Down

0 comments on commit aa55f78

Please sign in to comment.