Lines Matching refs:lock_limit
570 unsigned long lock_limit; in do_mlock() local
581 lock_limit = rlimit(RLIMIT_MEMLOCK); in do_mlock()
582 lock_limit >>= PAGE_SHIFT; in do_mlock()
589 if ((locked > lock_limit) && (!capable(CAP_IPC_LOCK))) { in do_mlock()
601 if ((locked <= lock_limit) || capable(CAP_IPC_LOCK)) in do_mlock()
699 unsigned long lock_limit; in SYSCALL_DEFINE1() local
709 lock_limit = rlimit(RLIMIT_MEMLOCK); in SYSCALL_DEFINE1()
710 lock_limit >>= PAGE_SHIFT; in SYSCALL_DEFINE1()
716 if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) || in SYSCALL_DEFINE1()
745 unsigned long lock_limit, locked; in user_shm_lock() local
750 lock_limit = rlimit(RLIMIT_MEMLOCK); in user_shm_lock()
751 if (lock_limit != RLIM_INFINITY) in user_shm_lock()
752 lock_limit >>= PAGE_SHIFT; in user_shm_lock()
756 if ((memlock == LONG_MAX || memlock > lock_limit) && !capable(CAP_IPC_LOCK)) { in user_shm_lock()