1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/dev/fb
Roger Pau Monné c397b61ea5 vesa: fix panic on suspend
Fix the following panic seen when migrating a FreeBSD guest on Xen:

panic: mtx_lock() of destroyed mutex @ /usr/src/sys/dev/fb/vesa.c:541
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001d2fa4f0
vpanic() at vpanic+0x182/frame 0xfffffe001d2fa570
kassert_panic() at kassert_panic+0x126/frame 0xfffffe001d2fa5e0
__mtx_lock_flags() at __mtx_lock_flags+0x15b/frame 0xfffffe001d2fa630
vesa_bios_save_restore() at vesa_bios_save_restore+0x78/frame 0xfffffe001d2fa680
vga_suspend() at vga_suspend+0xa3/frame 0xfffffe001d2fa6b0
isavga_suspend() at isavga_suspend+0x1d/frame 0xfffffe001d2fa6d0
bus_generic_suspend_child() at bus_generic_suspend_child+0x44/frame
[...]

This is caused because vga_sub_configure (which is called if the VGA adapter
is attached after VESA tried to initialize), points to vesa_configure, which
doesn't initialize the VESA mutex. In order to fix it, make sure
vga_sub_configure points to vesa_load, so that all the needed vesa
components are properly initialized.

Sponsored by:		Citrix Systems R&D
MFC after:		3 days
PR:			209203
Reviewed by:		dumbbell
Differential revision:	https://reviews.freebsd.org/D7196
2016-07-20 09:29:39 +00:00
..
boot_font.c
creator_vt.c
creator.c sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
creatorreg.h
fb_if.m
fb.c sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
fbd.c
fbreg.h
gallant12x22.c
gfb.h
machfb.c sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
machfbreg.h
s3_pci.c
splash_bmp.c
splash_pcx.c
splash_txt.c
splash.c sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
splashreg.h
vesa.c vesa: fix panic on suspend 2016-07-20 09:29:39 +00:00
vesa.h
vga.c sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
vgareg.h