diff options
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 5bffab93f..3a322f8a5 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -144,7 +144,7 @@ static int do_mlock(unsigned long start, size_t len, int on) struct vm_area_struct * vma, * next; int error; - if (!suser()) + if (!capable(CAP_IPC_LOCK)) return -EPERM; len = (len + ~PAGE_MASK) & PAGE_MASK; end = start + len; @@ -235,7 +235,7 @@ static int do_mlockall(int flags) unsigned int def_flags; struct vm_area_struct * vma; - if (!suser()) + if (!capable(CAP_IPC_LOCK)) return -EPERM; def_flags = 0; |