All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: minyard@acm.org
Cc: stable@vger.kernel.org, cminyard@mvista.com, yangyingliang@huawei.com
Subject: Re: [PATCH] ipmi_si: Fix crash when using hard-coded device
Date: Wed, 27 Mar 2019 10:47:53 -0400	[thread overview]
Message-ID: <20190327144753.GJ25262@sasha-vm> (raw)
In-Reply-To: <20190326161004.29378-1-minyard@acm.org>

On Tue, Mar 26, 2019 at 11:10:04AM -0500, minyard@acm.org wrote:
>From: Corey Minyard <cminyard@mvista.com>
>
>Backport from 41b766d661bf94a364960862cfc248a78313dbd3
>
>When excuting a command like:
>  modprobe ipmi_si ports=0xffc0e3 type=bt
>The system would get an oops.
>
>The trouble here is that ipmi_si_hardcode_find_bmc() is called before
>ipmi_si_platform_init(), but initialization of the hard-coded device
>creates an IPMI platform device, which won't be initialized yet.
>
>The real trouble is that hard-coded devices aren't created with
>any device, and the fixup is done later.  So do it right, create the
>hard-coded devices as normal platform devices.
>
>This required adding some new resource types to the IPMI platform
>code for passing information required by the hard-coded device
>and adding some code to remove the hard-coded platform devices
>on module removal.
>
>To enforce the "hard-coded devices passed by the user take priority
>over firmware devices" rule, some special code was added to check
>and see if a hard-coded device already exists.
>
>The backport required some minor fixups and adding the device
>id table that had been added in another change and was used
>in this one.
>
>Reported-by: Yang Yingliang <yangyingliang@huawei.com>
>Cc: stable@vger.kernel.org # v4.15+
>Signed-off-by: Corey Minyard <cminyard@mvista.com>
>Tested-by: Yang Yingliang <yangyingliang@huawei.com>
>---
>
>This backport is for 4.19, the backport from the main tree
>failed.  Passes basic tests.

Queued for 4.19, thank you.

--
Thanks,
Sasha

  reply	other threads:[~2019-03-27 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 16:10 [PATCH] ipmi_si: Fix crash when using hard-coded device minyard
2019-03-27 14:47 ` Sasha Levin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-21 18:33 minyard
2019-02-22  9:11 ` Yang Yingliang
2019-02-22 13:14   ` 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=20190327144753.GJ25262@sasha-vm \
    --to=sashal@kernel.org \
    --cc=cminyard@mvista.com \
    --cc=minyard@acm.org \
    --cc=stable@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.