mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]fix oops when inserting ipmi_si module
@ 2005-03-17  9:18 Li Shaohua
  0 siblings, 0 replies; only message in thread
From: Li Shaohua @ 2005-03-17  9:18 UTC (permalink / raw)
  To: lkml; +Cc: Andrew Morton

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

Signed-off-by: Li Shaohua<shaohua.li@intel.com>

--- a/drivers/char/ipmi/ipmi_si_intf.c	2005-03-03 10:56:51.000000000 +0800
+++ b/drivers/char/ipmi/ipmi_si_intf.c	2005-03-17 16:34:32.478606080 +0800
@@ -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)
 	{



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-17  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17  9:18 [PATCH]fix oops when inserting ipmi_si module Li Shaohua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®