From 231f843f5566deb49c0bf885c119cce5089294cf Mon Sep 17 00:00:00 2001 From: Aleksandr Rybalko Date: Thu, 27 Mar 2014 09:24:09 +0000 Subject: [PATCH] Fix crash on resume in vt(9). Statically allocated terminal window have not initialized callout handler, so we have to initialize it even for existing window if it is console window. Reported by: gjb and many Tested by: gjb MFC after: 7 days Sponsored by: The FreeBSD Foundation --- sys/dev/vt/vt_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 669e10f7fa32..f7ca605e3a39 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1872,6 +1872,9 @@ vt_upgrade(struct vt_device *vd) if (vw == NULL) { /* New window. */ vw = vt_allocate_window(vd, i); + } else if (vw->vw_flags & VWF_CONSOLE) { + /* For existing console window. */ + callout_init(&vw->vw_proc_dead_timer, 0); } if (i == VT_CONSWINDOW) { /* Console window. */