Skip to contentSkip to conversation

fix oops when inserting ipmi_si module

PATCH New Li Shaohua 1 participant 1 message Mar 17, 2005 IPMI

lore
Share & tools
lore

Li Shaohua

author
#0 lore raw

PATCH 1/1 fix oops when inserting ipmi_si module

Hi,
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.

Thanks,
Shaohua

drivers/char/ipmi/ipmi_si_intf.c +5 -0
@@ -1466,6 +1466,11 @@ static int try_init_acpi(int intf_num, s
 	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)
 	{