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:
574732c
)
param: fix uninitialized read with CONFIG_DEBUG_LOCK_ALLOC
author
Rusty Russell
<
[email protected]
>
Mon, 19 Jan 2015 22:37:04 +0000
(09:07 +1030)
committer
Rusty Russell
<
[email protected]
>
Tue, 20 Jan 2015 01:08:31 +0000
(11:38 +1030)
ignore_lockdep is uninitialized, and sysfs_attr_init() doesn't initialize
it, so memset to 0.
Reported-by: Huang Ying <
[email protected]
>
Cc: Eric W. Biederman <
[email protected]
>
Signed-off-by: Rusty Russell <
[email protected]
>
kernel/params.c
patch
|
blob
|
history
diff --git
a/kernel/params.c
b/kernel/params.c
index bd65d136a470ccba8355402aab1e808a17a0a187..728e05b167de984afe2e815f63207952051c3915 100644
(file)
--- a/
kernel/params.c
+++ b/
kernel/params.c
@@
-642,6
+642,7
@@
static __modinit int add_sysfs_param(struct module_kobject *mk,
mk->mp->grp.attrs = new_attrs;
/* Tack new one on the end. */
+ memset(&mk->mp->attrs[mk->mp->num], 0, sizeof(mk->mp->attrs[0]));
sysfs_attr_init(&mk->mp->attrs[mk->mp->num].mattr.attr);
mk->mp->attrs[mk->mp->num].param = kp;
mk->mp->attrs[mk->mp->num].mattr.show = param_attr_show;