Lines Matching refs:rlim
1458 struct rlimit *rlim; in do_prlimit() local
1474 rlim = tsk->signal->rlim + resource; in do_prlimit()
1481 if (new_rlim->rlim_max > rlim->rlim_max && in do_prlimit()
1489 *old_rlim = *rlim; in do_prlimit()
1491 *rlim = *new_rlim; in do_prlimit()
1518 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1525 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1533 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1538 if (copy_from_user(&r32, rlim, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1553 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1570 if (copy_to_user(rlim, &r32, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1584 struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1592 x = current->signal->rlim[resource]; in SYSCALL_DEFINE2()
1598 return copy_to_user(rlim, &x, sizeof(x)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1603 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1612 r = current->signal->rlim[resource]; in COMPAT_SYSCALL_DEFINE2()
1619 if (put_user(r.rlim_cur, &rlim->rlim_cur) || in COMPAT_SYSCALL_DEFINE2()
1620 put_user(r.rlim_max, &rlim->rlim_max)) in COMPAT_SYSCALL_DEFINE2()
1637 static void rlim_to_rlim64(const struct rlimit *rlim, struct rlimit64 *rlim64) in rlim_to_rlim64() argument
1639 if (rlim->rlim_cur == RLIM_INFINITY) in rlim_to_rlim64()
1642 rlim64->rlim_cur = rlim->rlim_cur; in rlim_to_rlim64()
1643 if (rlim->rlim_max == RLIM_INFINITY) in rlim_to_rlim64()
1646 rlim64->rlim_max = rlim->rlim_max; in rlim_to_rlim64()
1649 static void rlim64_to_rlim(const struct rlimit64 *rlim64, struct rlimit *rlim) in rlim64_to_rlim() argument
1652 rlim->rlim_cur = RLIM_INFINITY; in rlim64_to_rlim()
1654 rlim->rlim_cur = (unsigned long)rlim64->rlim_cur; in rlim64_to_rlim()
1656 rlim->rlim_max = RLIM_INFINITY; in rlim64_to_rlim()
1658 rlim->rlim_max = (unsigned long)rlim64->rlim_max; in rlim64_to_rlim()
1731 SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1735 if (copy_from_user(&new_rlim, rlim, sizeof(*rlim))) in SYSCALL_DEFINE2()