Subject: Re: port-alpha/36628: cdhdtape image panics with memory management
To: None <port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 07/12/2007 15:50:03
The following reply was made to PR port-alpha/36628; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: ChristophFranzen@gmx.net
Cc: gnats-bugs@NetBSD.org, port-alpha-maintainer@NetBSD.org,
	tsutsui@ceres.dti.ne.jp
Subject: Re: port-alpha/36628: cdhdtape image panics with memory management
	 trap on Jensen
Date: Fri, 13 Jul 2007 00:47:16 +0900

 ChristophFranzen@gmx.net wrote:
 
 > NetBSD 4.0_BETA2 (INSTALL) #0: Mon Jul  9 22:30:11 PDT 2007
 > 
 > 	builds@wb27:/home/builds/ab/netbsd-4/alpha/200707090002Z-
 > obj/home/builds/ab/netbsd-4/src/sys/arch/alpha/compile/INSTALL
 > 
 > DEC2000 model 300, 150MHz, s/n 
 > 8192 byte page size, 1 processor.
 > total memory = 32768 KB
 > (2048 KB reserved for PROM, 30720 KB used by NetBSD)
 > avail memory = 21120 KB
 > mainbus0 (root)
 > CPU 0: fatal kernel trap:
 > 
 > CPU 0    trap entry = 0x2 (memory management fault)
 > CPU 0    a0         = 0x20
 > CPU 0    a1         = 0x1
 > CPU 0    a2         = 0x0
 > CPU 0    pc         = 0xfffffc00005bb410
 > CPU 0    ra         = 0xfffffc00005bb3d4
 > CPU 0    pv         = 0xfffffc00005f02f0
 
 Hmm, looks NULL pointer dereference in
 alpha/dec_2000_300.c:dec_2000_300_device_register().
 
 Could you try the following image or attached patch?
 
 http://www.ceres.dti.ne.jp/~tsutsui/netbsd/cdhdtape-20070712.gz
 
 
 Index: alpha/dec_2000_300.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/alpha/alpha/dec_2000_300.c,v
 retrieving revision 1.13
 diff -u -r1.13 dec_2000_300.c
 --- alpha/dec_2000_300.c	4 Mar 2007 15:18:10 -0000	1.13
 +++ alpha/dec_2000_300.c	12 Jul 2007 14:39:03 -0000
 @@ -229,7 +229,7 @@
  		isadev = dev;
  
  	if (scsiboot && (scsidev == NULL)) {
 -		if (parent != eisadev)
 +		if (eisadev == NULL || parent != eisadev)
  			return;
  		else {
  			struct eisa_attach_args *ea = aux;
 @@ -286,7 +286,7 @@
  		/*
  		 * XXX WHAT ABOUT ISA NETWORK CARDS?
  		 */
 -		if (parent != eisadev)
 +		if (eisadev == NULL || parent != eisadev)
  			return;
  		else {
  			struct eisa_attach_args *ea = aux;
 
 ---
 Izumi Tsutsui