linux_dsm_epyc7002/drivers/char/ipmi
Corey Minyard 41b766d661 ipmi_si: Fix crash when using hard-coded device
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.

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>
2019-02-22 07:12:41 -06:00
..
bt-bmc.c ipmi: Add or fix SPDX-License-Identifier in all files 2018-02-27 07:42:51 -06:00
ipmi_bt_sm.c ipmi: Convert pr_xxx() to dev_xxx() in the BT code 2018-09-18 16:15:33 -05:00
ipmi_devintf.c ipmi: Fix return value when a message is truncated 2019-02-09 19:48:42 -06:00
ipmi_dmi.c ipmi: Remove platform driver overrides and use the id_table 2018-09-18 16:15:33 -05:00
ipmi_dmi.h ipmi: Add or fix SPDX-License-Identifier in all files 2018-02-27 07:42:51 -06:00
ipmi_kcs_sm.c ipmi: Convert printk(KERN_<level> to pr_<level>( 2018-09-18 16:15:33 -05:00
ipmi_msghandler.c ipmi: Use dedicated API for copying a UUID 2019-02-09 19:48:43 -06:00
ipmi_powernv.c ipmi:powernv: Convert ipmi_smi_t to struct ipmi_smi 2018-09-18 16:15:33 -05:00
ipmi_poweroff.c ipmi: Use more common logging styles 2018-09-18 16:15:33 -05:00
ipmi_si_hardcode.c ipmi_si: Fix crash when using hard-coded device 2019-02-22 07:12:41 -06:00
ipmi_si_hotmod.c ipmi: Use more common logging styles 2018-09-18 16:15:33 -05:00
ipmi_si_intf.c ipmi_si: Fix crash when using hard-coded device 2019-02-22 07:12:41 -06:00
ipmi_si_mem_io.c ipmi_si: fix use-after-free of resource->name 2019-02-09 19:48:41 -06:00
ipmi_si_parisc.c ipmi: Add or fix SPDX-License-Identifier in all files 2018-02-27 07:42:51 -06:00
ipmi_si_pci.c ipmi_si_pci: fix NULL device in ipmi_si error message 2018-09-18 16:15:33 -05:00
ipmi_si_platform.c ipmi_si: Fix crash when using hard-coded device 2019-02-22 07:12:41 -06:00
ipmi_si_port_io.c ipmi_si: fix use-after-free of resource->name 2019-02-09 19:48:41 -06:00
ipmi_si_sm.h ipmi: Add or fix SPDX-License-Identifier in all files 2018-02-27 07:42:51 -06:00
ipmi_si.h ipmi_si: Fix crash when using hard-coded device 2019-02-22 07:12:41 -06:00
ipmi_smic_sm.c ipmi: Convert printk(KERN_<level> to pr_<level>( 2018-09-18 16:15:33 -05:00
ipmi_ssif.c ipmi:ssif: Change some pr_xxx to dev_xxx calls 2019-02-09 19:48:42 -06:00
ipmi_watchdog.c ipmi: Use more common logging styles 2018-09-18 16:15:33 -05:00
Kconfig ipmi: Remove the proc interface 2018-05-09 12:21:46 -05:00
kcs_bmc_aspeed.c ipmi: kcs_bmc: coding-style fixes and use new poll type 2018-02-26 09:49:21 -06:00
kcs_bmc_npcm7xx.c ipmi: NPCM7xx KCS BMC: enable interrupt to the host 2018-05-23 08:29:23 -05:00
kcs_bmc.c ipmi: kcs_bmc: handle devm_kasprintf() failure case 2019-02-09 19:48:42 -06:00
kcs_bmc.h ipmi: kcs_bmc: coding-style fixes and use new poll type 2018-02-26 09:49:21 -06:00
Makefile ipmi: add an NPCM7xx KCS BMC driver 2018-04-18 10:23:12 -05:00