projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1310a5a
)
kernel/sysctl.c: check return value after call proc_put_char() in __do_proc_doulongve...
author
Chen Gang
<
[email protected]
>
Tue, 12 Nov 2013 23:11:21 +0000
(15:11 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 13 Nov 2013 03:09:33 +0000
(12:09 +0900)
Need to check the return value of proc_put_char(), as was done in
__do_proc_doulongvec_minmax().
Signed-off-by: Chen Gang <
[email protected]
>
Cc: "Eric W. Biederman" <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/sysctl.c
patch
|
blob
|
history
diff --git
a/kernel/sysctl.c
b/kernel/sysctl.c
index 36547dddcdb83eab551d0ee60fa34218067d1028..d37d9dd8f4635069bf65bd2a10b00e1595ae7b64 100644
(file)
--- 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;