Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 09:24:09 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263809 - head/sys/dev/vt
Message-ID:  <201403270924.s2R9O9t1094508@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Thu Mar 27 09:24:09 2014
New Revision: 263809
URL: http://svnweb.freebsd.org/changeset/base/263809

Log:
  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

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Thu Mar 27 08:52:48 2014	(r263808)
+++ head/sys/dev/vt/vt_core.c	Thu Mar 27 09:24:09 2014	(r263809)
@@ -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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403270924.s2R9O9t1094508>