]> git.ipfire.org Git - thirdparty/qemu.git/commit
macfb: fix invalid object reference in macfb_common_realize()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 7 Oct 2021 22:12:43 +0000 (23:12 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 8 Oct 2021 11:31:02 +0000 (13:31 +0200)
commit906c2323f1edf41b1851e7e36231023ee930aa3c
tree6307901670b9bbf6a600cbea702403d0c539df44
parentc047862acd502c305fbdc66a4a3fd717c04fa6d2
macfb: fix invalid object reference in macfb_common_realize()

During realize memory_region_init_ram_nomigrate() is used to initialise the RAM
memory region used for the framebuffer but the owner object reference is
incorrect since MacFbState is a typedef and not a QOM type.

Change the memory region owner to be the corresponding DeviceState to fix the
issue and prevent random crashes during macfb_common_realize().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fixes: 8ac919a0654 ("hw/m68k: add Nubus macfb video card")
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/display/macfb.c