Skip to content

Commit

Permalink
[PATCH] ipmi: fix uninitialized data bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Oct 3, 2006
1 parent c3b6571 commit 397f4eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 397f4eb

Please sign in to comment.