Date: Tue, 25 Apr 1995 18:50:13 -0700 From: pb@fasterix.freenix.fr To: freebsd-bugs Subject: kern/363: page fault in sio.c:sioioctl soon after boot (+ suggested fix) Message-ID: <199504260150.SAA29664@freefall.cdrom.com> In-Reply-To: Your message of Wed, 26 Apr 1995 02:36:59 %2B0200 <199504260036.CAA00321@fasterix.frmug.fr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>Number: 363 >Category: kern >Synopsis: page fault in sio.c soon after boot (+ suggested fix) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 25 18:50:04 1995 >Originator: Pierre Beyssac >Organization: Pierre Beyssac >Release: FreeBSD 2.1.0-Development i386 >Environment: out-of-the-box April 12th snapshot. >Description: page fault line 1296 in sioioctl() : sio.c: 1293 com = com_addr(MINOR_TO_UNIT(mynor)); 1294 iobase = com->iobase; 1295 tp = com->tp; ->1296 term = tp->t_termios; 1297 oldcmd = cmd; >How-To-Repeat: boot single stty -f /dev/ttyid0 -> page fault >Fix: suggested fix in sioopen() : 781 if ((u_int) unit >= NSIO || (com = com_addr(unit)) == NULL) 782 return (ENXIO); |< 783 if (mynor & CONTROL_MASK) |< 784 return (0); | 785 #if 0 /* XXX TK2.0 */ | 786 tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]); | 787 #else | 788 tp = com->tp = &sio_tty[unit]; | 789 #endif --> Move 783-784 after 789 Note that there seems to be a workaround : access /dev/ttydX before /dev/tty[il]X, using comcontrol for example (as in rc.serial, which may explain why the bug has gone unnoticed). Note also that there might be other pointers missing an initialization ; I had another panic after that fix (most likely related because it occured on a system call done by getty()), but have not been able to track down the problem yet. >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504260150.SAA29664>