Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 1997 20:30:25 +0100 (MET)
From:      pda@prism.uvsq.fr
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/2540: Fatal trap 12 with a GENERIC kernel and disabled PS/2 mouse
Message-ID:  <199701201930.UAA00410@vagabond.prism.uvsq.fr>
Resent-Message-ID: <199701201940.LAA21239@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2540
>Category:       kern
>Synopsis:       Fatal trap 12 with a GENERIC kernel and disabled PS/2 mouse
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 20 11:40:06 PST 1997
>Last-Modified:
>Originator:     Pierre David
>Organization:
Laboratoire PRiSM, Universite de Versailles - St Quentin, FRANCE
>Release:        FreeBSD 2.2-BETA_A i386
>Environment:

	Dell Latitude XPi 120 ST
	GENERIC kernel "out of the box" (=> with PS/2 mouse disabled)

>Description:

	Opening /dev/psm0 with a disabled PS/2 mouse (as supplied in
	the GENERIC kernel, for example) causes the system to crash.

	For example (with a kernel based on GENERIC, with DDB support
	added), and in single user mode (to save time between reboots ;-)

	Fatal trap 12: page fault while in kernel mode
	fault virtual address	= 0x8
	fault code		= supervisor read, page not present
	instruction pointer	= 0x8:0xf01c365b
	stack pointer		= 0x10:0xefbffdb4
	frame pointer		= 0x10:0xefbffdcc
	code segment		= base 0x0, limit 0xfffff, type 0x1b
				= DPL 0, pres 1, def32 1, gran 1
	processor eflags	= interrupt enabled, resume, IOPL = 0
	current process		= 15 (sh)
	interrupt mask		= 
	kernel: type 12 trap, code = 0
	Stopped at	_psmopen+0x1f:	cmpb $0,0x8(%ebx)
	db>

	db>x psm_softc
	_psm_sofc	0

	psm_softc [0] array is not initialized, if not probed.

>How-To-Repeat:

	cat < /dev/psm0

	or

	start the X server

>Fix:
	
	Here is a proposed fix:

	*** /usr/src/sys/i386/isa/psm.c.org	Thu Jan 16 23:25:51 1997
	--- /usr/src/sys/i386/isa/psm.c	Fri Jan 17 21:52:52 1997
	***************
	*** 781,787 ****
	      int stat[3];
	  
	      /* Validate unit number */
	!     if (unit >= NPSM)
		  return (ENXIO);
	  
	      /* Get device data */
	--- 781,787 ----
	      int stat[3];
	  
	      /* Validate unit number */
	!     if (unit >= NPSM || psm_softc [unit] == NULL)
		  return (ENXIO);
	  
	      /* Get device data */

>Audit-Trail:
>Unformatted:



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