diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 53de35fc8245..2b8e2daa9d95 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1472,7 +1472,7 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim) | |||
1472 | if ((new_rlim.rlim_max > old_rlim->rlim_max) && | 1472 | if ((new_rlim.rlim_max > old_rlim->rlim_max) && |
1473 | !capable(CAP_SYS_RESOURCE)) | 1473 | !capable(CAP_SYS_RESOURCE)) |
1474 | return -EPERM; | 1474 | return -EPERM; |
1475 | if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > NR_OPEN) | 1475 | if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > sysctl_nr_open) |
1476 | return -EPERM; | 1476 | return -EPERM; |
1477 | 1477 | ||
1478 | retval = security_task_setrlimit(resource, &new_rlim); | 1478 | retval = security_task_setrlimit(resource, &new_rlim); |