Re: Handling panics inside vt(4) callbacks

From: Jean-Sébastien_Pédron <>
Date: Thu, 13 Apr 2023 22:12:54 UTC
On 12/04/2023 23:33, Kyle Evans wrote:
> FWIW, I have a related patch that I maintain in my tree that I simply
> haven't found time to try and upstream.  When the system panics, it
> tries to switch back to ttyv0, but it calls into vd_postswitch() with
> the vt lock still held. In my case, with i915kms, the vd_postswitch
> implementation attempts to sleep with the lock still held and
> everything goes off the rails. See below.
Indeed, there are several locking issues in the DRM driver callbacks 
related to vt(4) because of the different contraints in Linux. I'm 
currently working on revisiting the way we integrate the DRM drivers in 
vt(4), hopefully this work will address the problem you hit.

Jean-Sébastien Pédron
The FreeBSD Project