diff options
Diffstat (limited to 'kernel/pid_namespace.c')
| -rw-r--r-- | kernel/pid_namespace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index b3c7fd554250..6144bab8fd8e 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
| @@ -232,15 +232,19 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write, | |||
| 232 | */ | 232 | */ |
| 233 | 233 | ||
| 234 | tmp.data = ¤t->nsproxy->pid_ns->last_pid; | 234 | tmp.data = ¤t->nsproxy->pid_ns->last_pid; |
| 235 | return proc_dointvec(&tmp, write, buffer, lenp, ppos); | 235 | return proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | extern int pid_max; | ||
| 239 | static int zero = 0; | ||
| 238 | static struct ctl_table pid_ns_ctl_table[] = { | 240 | static struct ctl_table pid_ns_ctl_table[] = { |
| 239 | { | 241 | { |
| 240 | .procname = "ns_last_pid", | 242 | .procname = "ns_last_pid", |
| 241 | .maxlen = sizeof(int), | 243 | .maxlen = sizeof(int), |
| 242 | .mode = 0666, /* permissions are checked in the handler */ | 244 | .mode = 0666, /* permissions are checked in the handler */ |
| 243 | .proc_handler = pid_ns_ctl_handler, | 245 | .proc_handler = pid_ns_ctl_handler, |
| 246 | .extra1 = &zero, | ||
| 247 | .extra2 = &pid_max, | ||
| 244 | }, | 248 | }, |
| 245 | { } | 249 | { } |
| 246 | }; | 250 | }; |
