qemu/hw/ipmi
Markus Armbruster f6166a4da5 hw/ipmi: Fix realize() error API violations
isa_ipmi_bt_realize(), ipmi_isa_realize(), pci_ipmi_bt_realize(), and
pci_ipmi_kcs_realize() dereference @errp when IPMIInterfaceClass
method init() fails.  That's wrong; see the big comment in error.h.
Introduced in commit 0719029c47 "ipmi: Add an ISA KCS low-level
interface", then imitated in commit a9b74079cb "ipmi: Add a BT
low-level interface" and commit 12f983c6aa "ipmi: Add PCI IPMI
interfaces".

No caller actually passes null.

Fix anyway: splice in a local Error *err, and error_propagate().

Cc: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191204093625.14836-9-armbru@redhat.com>
2019-12-18 08:36:15 +01:00
..
ipmi_bmc_extern.c hw/ipmi: Rewrite a fall through comment 2019-08-21 10:56:19 +02:00
ipmi_bmc_sim.c ipmi: Add support to customize OEM functions 2019-12-17 10:39:47 +11:00
ipmi_bt.c ipmi: Allow a size value to be passed for I/O space 2019-09-20 14:08:10 -05:00
ipmi_kcs.c ipmi: Allow a size value to be passed for I/O space 2019-09-20 14:08:10 -05:00
ipmi.c ipmi: Fix watchdog NMI handling 2019-09-20 14:08:10 -05:00
isa_ipmi_bt.c hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
isa_ipmi_kcs.c hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
Kconfig ipmi: Add an SMBus IPMI interface 2019-09-20 14:08:10 -05:00
Makefile.objs ipmi: Add an SMBus IPMI interface 2019-09-20 14:08:10 -05:00
pci_ipmi_bt.c hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
pci_ipmi_kcs.c hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
smbus_ipmi.c ipmi: Add an SMBus IPMI interface 2019-09-20 14:08:10 -05:00