qemu-e2k/hw/char
Peter Maydell 617dff091f hw/char/exynos4210_uart: Fix crash on trying to load VM state
The exynos4210_uart_post_load() function assumes that it is passed
the Exynos4210UartState, but it has been attached to the
VMStateDescription for the Exynos4210UartFIFO type.  The result is a
SIGSEGV when attempting to load VM state for any machine type
including this device.

Fix the bug by attaching the post-load function to the VMSD for the
Exynos4210UartState.  This is the logical place for it, because the
actions it does relate to the entire UART state, not just the FIFO.

Thanks to the bug reporter @TrungNguyen1909 for the clear bug
description and the suggested fix.

Fixes: c9d3396d80
   ("hw/char/exynos4210_uart: Implement post_load function")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/638
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20220120151648.433736-1-peter.maydell@linaro.org
2022-01-28 14:29:46 +00:00
..
avr_usart.c
bcm2835_aux.c
cadence_uart.c hw/char: cadence_uart: Log a guest error when device is unclocked or in reset 2021-09-13 16:07:21 +01:00
cmsdk-apb-uart.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
debugcon.c
digic-uart.c
escc.c escc: update the R_SPEC register SPEC_ALLSENT bit when writing to W_TXCTRL1 2021-11-21 09:56:52 +00:00
etraxfs_ser.c hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
exynos4210_uart.c hw/char/exynos4210_uart: Fix crash on trying to load VM state 2022-01-28 14:29:46 +00:00
goldfish_tty.c hw/m68k: Fix typo in SPDX tag 2021-11-09 10:11:27 +01:00
grlib_apbuart.c
ibex_uart.c hw/char: ibex_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
imx_serial.c
ipoctal232.c
Kconfig hw/char: Add config for shakti uart 2021-09-01 11:59:12 +10:00
mcf_uart.c
mchp_pfsoc_mmuart.c hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART 2021-10-07 08:41:33 +10:00
meson.build hw/char: Add config for shakti uart 2021-09-01 11:59:12 +10:00
nrf51_uart.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
omap_uart.c
parallel-isa.c
parallel.c
pl011.c hw/char/pl011: add support for sending break 2021-08-25 10:48:50 +01:00
renesas_sci.c
riscv_htif.c hw/riscv: spike: Allow using binary firmware as bios 2022-01-21 15:52:56 +10:00
sclpconsole-lm.c
sclpconsole.c
serial-isa.c
serial-pci-multi.c
serial-pci.c
serial.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
sh_serial.c hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
shakti_uart.c hw/char: shakti_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
sifive_uart.c hw/char: sifive_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
spapr_vty.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
stm32f2xx_usart.c Fix STM32F2XX USART data register readout 2021-12-15 10:11:34 +00:00
terminal3270.c s390x: css: report errors from ccw_dstream_read/write 2021-04-09 10:52:13 +02:00
trace-events hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
trace.h
virtio-console.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
virtio-serial-bus.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
xen_console.c
xilinx_uartlite.c