aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sys.c2
-rw-r--r--kernel/sysctl.c8
2 files changed, 9 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);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5e2ad5bf88e2..86daaa26d120 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1203,6 +1203,14 @@ static struct ctl_table fs_table[] = {
1203 .proc_handler = &proc_dointvec, 1203 .proc_handler = &proc_dointvec,
1204 }, 1204 },
1205 { 1205 {
1206 .ctl_name = CTL_UNNUMBERED,
1207 .procname = "nr_open",
1208 .data = &sysctl_nr_open,
1209 .maxlen = sizeof(int),
1210 .mode = 0644,
1211 .proc_handler = &proc_dointvec,
1212 },
1213 {
1206 .ctl_name = FS_DENTRY, 1214 .ctl_name = FS_DENTRY,
1207 .procname = "dentry-state", 1215 .procname = "dentry-state",
1208 .data = &dentry_stat, 1216 .data = &dentry_stat,