summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-11-13 00:11:21 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 04:09:33 +0100
commit7833819d2e5b2a0189f6e9d445ba03f4d7ba2656 (patch)
treee6fc6a60153b0f669e3c57c203666982f00fed0e /kernel/sysctl.c
parentrbtree: fix rbtree_postorder_for_each_entry_safe() iterator (diff)
downloadlinux-7833819d2e5b2a0189f6e9d445ba03f4d7ba2656.tar.xz
linux-7833819d2e5b2a0189f6e9d445ba03f4d7ba2656.zip
kernel/sysctl.c: check return value after call proc_put_char() in __do_proc_doulongvec_minmax()
Need to check the return value of proc_put_char(), as was done in __do_proc_doulongvec_minmax(). Signed-off-by: Chen Gang <gang.chen@asianux.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--kernel/sysctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 36547dddcdb8..d37d9dd8f463 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2222,8 +2222,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
*i = val;
} else {
val = convdiv * (*i) / convmul;
- if (!first)
+ if (!first) {
err = proc_put_char(&buffer, &left, '\t');
+ if (err)
+ break;
+ }
err = proc_put_long(&buffer, &left, val, false);
if (err)
break;