mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
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>
This commit is contained in:
parent
1310a5a99d
commit
7833819d2e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user