Bug 26508

Summary: [PATCH] syscons panic in userconfig mode
Product: Base System Reporter: dd <dd>
Component: kernAssignee: dd <dd>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dd freebsd_committer freebsd_triage 2001-04-12 09:10:01 UTC
Attempting to switch VTYs in userconfig mode will lead to a null
dereference in syscons.  I saw some messages about this on -current,
-stable, or -bugs recently, but I can't find them now.

Fix: The patch changes the VIRTUAL_TTY macro not to blindly assume
sc->dev[x] is a valid pointer.  It is safe to have it "return" NULL
because any code that uses it must (and does) already check for that
condition since si_tty may also be NULL in some cases (or at least
that's the way I understand it).
How-To-Repeat: 
This is pretty easy to reproduce: simply boot the kernel with the -c
flag (userconfig), and press ALT+F2 (i386).  As far as I can tell,
this isn't a new bug.
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2001-04-12 09:41:08 UTC
Responsible Changed
From-To: freebsd-bugs->jkh

I don't know who is really responsible for syscons, but this seems to be 
quite an unfortunate bug; I myself have triggered it a couple of times 
while setting up a new system. 

The fix seems quite trivial; maybe this should go in before 4.3-R? :)
Comment 2 dd freebsd_committer freebsd_triage 2001-05-25 01:21:49 UTC
Responsible Changed
From-To: jkh->dd

I'll commit this patch.
Comment 3 dd freebsd_committer freebsd_triage 2001-05-27 01:57:52 UTC
State Changed
From-To: open->analyzed

Committed my own patch; still assigned to myself as an MFC reminder.
Comment 4 dd freebsd_committer freebsd_triage 2001-06-12 04:25:45 UTC
State Changed
From-To: analyzed->closed

MFC'd