[PATCH] ipmi: fix uninitialized data bug
gcc issues the following warning: drivers/char/ipmi/ipmi_si_intf.c: In function âinit_ipmi_siâ: drivers/char/ipmi/ipmi_si_intf.c:1729: warning: âdata.irqâ may be used uninitialized in this function This is indeed a bug. data.irq is completely uninitialized in some code paths. Worse than that, data from a previous decode_dmi() run can easily leak through successive calls. Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
c3b6571384
commit
397f4ebf4f
@ -1734,6 +1734,7 @@ static void __devinit dmi_find_bmc(void)
|
||||
int rv;
|
||||
|
||||
while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) {
|
||||
memset(&data, 0, sizeof(data));
|
||||
rv = decode_dmi((struct dmi_header *) dev->device_data, &data);
|
||||
if (!rv)
|
||||
try_init_dmi(&data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user