]> Git Repo - qemu.git/commit - hw/ide/ahci.c
ahci.c: Don't assume AHCIState's parent is AHCIPCIState
authorAlistair Francis <[email protected]>
Tue, 8 Sep 2015 16:38:45 +0000 (17:38 +0100)
committerPeter Maydell <[email protected]>
Tue, 8 Sep 2015 16:38:45 +0000 (17:38 +0100)
commitbb639f829f139ddc83325b3b6825f93096ee44f1
treec0a6568c3a1b746ff579367c7413f7d3bf23661a
parent5ea8b9c5a3e823d1446a7e67d6d3b8d86bfd33d8
ahci.c: Don't assume AHCIState's parent is AHCIPCIState

The AHCIState struct can either have AHCIPCIState or SysbusAHCIState
as a parent. The ahci_irq_lower() and ahci_irq_raise() functions
assume that it is always AHCIPCIState, which is not always the
case, which causes a seg fault. Verify what the container of AHCIState
is before setting the PCIDevice struct.

Signed-off-by: Alistair Francis <[email protected]>
Acked-by: John Snow <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
hw/ide/ahci.c
hw/ide/ahci.h
This page took 0.025308 seconds and 4 git commands to generate.