ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address
authorCorey Minyard <cminyard@mvista.com>
Thu, 21 Jun 2018 20:32:48 +0000 (15:32 -0500)
committerCorey Minyard <cminyard@mvista.com>
Tue, 18 Sep 2018 21:15:33 +0000 (16:15 -0500)
Looking at logs from systems all over the place, it looks like tons
of broken systems exist that set the base address to zero.  I can
only guess that is some sort of non-standard idea to mark the
interface as not being present.  It can't be zero, anyway, so just
complain and ignore it.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_dmi.c

index 736ebbb..8e0c786 100644 (file)
@@ -218,6 +218,10 @@ static void __init dmi_decode_ipmi(const struct dmi_header *dm)
        slave_addr = data[DMI_IPMI_SLAVEADDR];
 
        memcpy(&base_addr, data + DMI_IPMI_ADDR, sizeof(unsigned long));
+       if (!base_addr) {
+               pr_err("Base address is zero, assuming no IPMI interface\n");
+               return;
+       }
        if (len >= DMI_IPMI_VER2_LENGTH) {
                if (type == IPMI_DMI_TYPE_SSIF) {
                        offset = 0;