Commit 7833819d authored by Chen Gang's avatar Chen Gang Committed by Linus Torvalds

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: default avatarChen Gang <gang.chen@asianux.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1310a5a9
...@@ -2222,8 +2222,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int ...@@ -2222,8 +2222,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
*i = val; *i = val;
} else { } else {
val = convdiv * (*i) / convmul; val = convdiv * (*i) / convmul;
if (!first) if (!first) {
err = proc_put_char(&buffer, &left, '\t'); err = proc_put_char(&buffer, &left, '\t');
if (err)
break;
}
err = proc_put_long(&buffer, &left, val, false); err = proc_put_long(&buffer, &left, val, false);
if (err) if (err)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment