mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Meelis Roos <mroos@linux.ee>
To: minyard@acm.org
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	openipmi-developer@lists.sourceforge.net,
	Corey Minyard <cminyard@mvista.com>
Subject: Re: [PATCH] ipmi: Cleanup oops on initialization failure
Date: Wed, 20 Jun 2018 17:26:49 +0300 (EEST)	[thread overview]
Message-ID: <alpine.LRH.2.21.1806201725520.28187@math.ut.ee> (raw)
In-Reply-To: <1529497606-3857-1-git-send-email-minyard@acm.org>

> Commit 93c303d2045b3 "ipmi_si: Clean up shutdown a bit" didn't
> copy the behavior of the cleanup in one spot, it needed to
> check for a non-NULL interface before cleaning it up.
> 
> Signed-off-by: Corey Minyard <cminyard@mvista.com>

Tested-by: Meelis Roos <mroos@linux.ee>


The corresponding dmesg:

[    7.372830] IPMI System Interface driver.
[    7.373034] ipmi_si dmi-ipmi-si.0: ipmi_platform: probing via SMBIOS
[    7.373109] ipmi_si: SMBIOS: mem 0x0 regsize 1 spacing 1 irq 0
[    7.373182] ipmi_si: Adding SMBIOS-specified kcs state machine
[    7.373352] ipmi_si: Trying SMBIOS-specified kcs state machine at mem address 0x0, slave address 0x20, irq 0
[    7.373479] ipmi_si dmi-ipmi-si.0: Could not set up I/O space

> BTW, can you send me at least the IPMI portion of the output of
> dmidecode for your machine?  I have seen a lot of these where the
> address in the SMBIOS tables is incorrect, and I'm wondering if
> it's something in the driver, or if it's really the tables that
> are bad.

Handle 0x001B, DMI type 38, 18 bytes
IPMI Device Information
        Interface Type: KCS (Keyboard Control Style)
        Specification Version: 2.0
        I2C Slave Address: 0x10
        NV Storage Device: Not Present
        Base Address: 0x0000000000000000 (Memory-mapped)
        Register Spacing: Successive Byte Boundaries

> 
> Thanks for reporting this.  On your tested-by I'll send this up
> to Linus.
> 
> -corey
> 
>  drivers/char/ipmi/ipmi_si_intf.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 3d0add6..a5987f8 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -2088,8 +2088,10 @@ static int try_smi_init(struct smi_info *new_smi)
>  	return 0;
>  
>  out_err:
> -	ipmi_unregister_smi(new_smi->intf);
> -	new_smi->intf = NULL;
> +	if (new_smi->intf) {
> +		ipmi_unregister_smi(new_smi->intf);
> +		new_smi->intf = NULL;
> +	}
>  
>  	kfree(init_name);
>  
> 

-- 
Meelis Roos (mroos@linux.ee)

  reply	other threads:[~2018-06-20 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 12:58 iomi-si UBSAN warning and NULL pointer dereference Meelis Roos
2018-06-20 12:26 ` [PATCH] ipmi: Cleanup oops on initialization failure minyard
2018-06-20 14:26   ` Meelis Roos [this message]
2018-06-20 23:00     ` Corey Minyard
2018-06-21  6:47       ` Meelis Roos
2018-06-21 20:16         ` Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.21.1806201725520.28187@math.ut.ee \
    --to=mroos@linux.ee \
    --cc=cminyard@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome