ChangeSet 1.2231.1.157, 2005/03/28 20:00:05-08:00, [EMAIL PROTECTED]
[PATCH] Fix oops when inserting ipmi_si module
In one of machines in our lab, spmi->addr.register_bit_width is 0 (so
the
returned address is invalid). Ignoring the check will cause inserting
the
module oops.
Signed-off-by: Li Shaohua<[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
ipmi_si_intf.c | 5 +++++
1 files changed, 5 insertions(+)
diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c 2005-03-28 21:41:01 -08:00
+++ b/drivers/char/ipmi/ipmi_si_intf.c 2005-03-28 21:41:01 -08:00
@@ -1477,6 +1477,11 @@
if (!is_new_interface(-1, addr_space, spmi->addr.address))
return -ENODEV;
+ if (!spmi->addr.register_bit_width) {
+ acpi_failure = 1;
+ return -ENODEV;
+ }
+
/* Figure out the interface type. */
switch (spmi->InterfaceType)
{
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html