diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sysctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index b12583047757..f948f20f09cb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -2253,6 +2253,8 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
2253 | if (write) { | 2253 | if (write) { |
2254 | left -= proc_skip_spaces(&kbuf); | 2254 | left -= proc_skip_spaces(&kbuf); |
2255 | 2255 | ||
2256 | if (!left) | ||
2257 | break; | ||
2256 | err = proc_get_long(&kbuf, &left, &lval, &neg, | 2258 | err = proc_get_long(&kbuf, &left, &lval, &neg, |
2257 | proc_wspace_sep, | 2259 | proc_wspace_sep, |
2258 | sizeof(proc_wspace_sep), NULL); | 2260 | sizeof(proc_wspace_sep), NULL); |
@@ -2279,7 +2281,7 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
2279 | 2281 | ||
2280 | if (!write && !first && left && !err) | 2282 | if (!write && !first && left && !err) |
2281 | err = proc_put_char(&buffer, &left, '\n'); | 2283 | err = proc_put_char(&buffer, &left, '\n'); |
2282 | if (write && !err) | 2284 | if (write && !err && left) |
2283 | left -= proc_skip_spaces(&kbuf); | 2285 | left -= proc_skip_spaces(&kbuf); |
2284 | free: | 2286 | free: |
2285 | if (write) { | 2287 | if (write) { |