From vak@hanoi.net.kiae.su  Thu Jul 20 08:12:48 1995
Received: from hanoi.net.kiae.su (hanoi.net.kiae.su [144.206.130.53])
          by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id IAA11116
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 Jul 1995 08:12:40 -0700
Received: (from vak@localhost) by hanoi.net.kiae.su (8.6.11/8.6.9) id TAA00322; Thu, 20 Jul 1995 19:12:13 +0400
Message-Id: <199507201512.TAA00322@hanoi.net.kiae.su>
Date: Thu, 20 Jul 1995 19:12:13 +0400
From: vak@cronyx.ru
Reply-To: vak@cronyx.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: vidcontrol causes crash when booted with sc0 disabled
X-Send-Pr-Version: 3.2

>Number:         627
>Category:       kern
>Synopsis:       vidcontrol causes crash when booted with sc0 disabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pst
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 20 08:20:01 1995
>Closed-Date:    Wed Feb 7 22:30:36 PST 1996
>Last-Modified:  Wed Feb  7 22:31:02 PST 1996
>Originator:     Serge V.Vakulenko
>Release:        FreeBSD 2.0-BUILT-19950603 i386
>Organization:
Cronyx Ltd.
>Environment:
>Description:

When the system is loaded with the sc0 driver configured, but disabled
(in kernel config mode), then any vidcontrol call causes the system crash.

>How-To-Repeat:

1. Boot the kernel with -h -c options.
2. Disable the sc0 driver (disable sc0). Quit the config mode (quit).
3. After the system is loaded, try, say, "vidcontrol -c blink".
   The system will crash.

>Fix:
	
Apply the following patch:

--- syscons205.c	Tue May 30 12:03:13 1995
+++ syscons.c	Thu Jul 20 17:16:29 1995
@@ -303,7 +303,7 @@
 {
     int unit = minor(dev);
 
-    if (unit > MAXCONS || unit < 0)
+    if (! init_done || unit > MAXCONS || unit < 0)
 	return(NULL);
     if (unit == MAXCONS)
 	return CONSOLE_TTY;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->pst 
Responsible-Changed-By: pst 
Responsible-Changed-When: Wed Feb 7 16:36:56 PST 1996 
Responsible-Changed-Why:  
State-Changed-From-To: open->closed 
State-Changed-By: pst 
State-Changed-When: Wed Feb 7 22:30:36 PST 1996 
State-Changed-Why:  
Fixed in -current. 

>Unformatted:


