Lines Matching refs:rlim
1418 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1425 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1433 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1438 if (copy_from_user(&r32, rlim, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1453 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1470 if (copy_to_user(rlim, &r32, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1484 struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1492 x = current->signal->rlim[resource]; in SYSCALL_DEFINE2()
1498 return copy_to_user(rlim, &x, sizeof(x)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1503 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1512 r = current->signal->rlim[resource]; in COMPAT_SYSCALL_DEFINE2()
1519 if (put_user(r.rlim_cur, &rlim->rlim_cur) || in COMPAT_SYSCALL_DEFINE2()
1520 put_user(r.rlim_max, &rlim->rlim_max)) in COMPAT_SYSCALL_DEFINE2()
1537 static void rlim_to_rlim64(const struct rlimit *rlim, struct rlimit64 *rlim64) in rlim_to_rlim64() argument
1539 if (rlim->rlim_cur == RLIM_INFINITY) in rlim_to_rlim64()
1542 rlim64->rlim_cur = rlim->rlim_cur; in rlim_to_rlim64()
1543 if (rlim->rlim_max == RLIM_INFINITY) in rlim_to_rlim64()
1546 rlim64->rlim_max = rlim->rlim_max; in rlim_to_rlim64()
1549 static void rlim64_to_rlim(const struct rlimit64 *rlim64, struct rlimit *rlim) in rlim64_to_rlim() argument
1552 rlim->rlim_cur = RLIM_INFINITY; in rlim64_to_rlim()
1554 rlim->rlim_cur = (unsigned long)rlim64->rlim_cur; in rlim64_to_rlim()
1556 rlim->rlim_max = RLIM_INFINITY; in rlim64_to_rlim()
1558 rlim->rlim_max = (unsigned long)rlim64->rlim_max; in rlim64_to_rlim()
1565 struct rlimit *rlim; in do_prlimit() local
1585 rlim = tsk->signal->rlim + resource; in do_prlimit()
1590 if (new_rlim->rlim_max > rlim->rlim_max && in do_prlimit()
1598 *old_rlim = *rlim; in do_prlimit()
1600 *rlim = *new_rlim; in do_prlimit()
1688 SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1692 if (copy_from_user(&new_rlim, rlim, sizeof(*rlim))) in SYSCALL_DEFINE2()