Inconsistent capabilites associated with MPOL_MOVE_ALL

Michael Kerrisk
2006-03-15T00:01:09Z

Andi, Christoph,

In the implementation of migrate_pages() one finds the following
lines:

err = do_migrate_pages(mm, &old, &new,
capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);

while in the implemantation of mbind() we have:

if ((flags & MPOL_MF_MOVE_ALL( && !capable(CAP_SYS_RESOURCE))
return -EPERM;

Is it really intended to associate two *different* capabilities
with the operation of MPOL_MF_MOVE_ALL in this fashion? At
first glance, it seems rather inconsistent to do so.

Cheers,

Michael

--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source
files for 'FIXME'.