From owner-acpi-jp@jp.FreeBSD.org Wed Nov 27 15:32:16 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gAR6WG524092;
	Wed, 27 Nov 2002 15:32:16 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gAR6WF224077
	for <acpi-jp@jp.FreeBSD.org>; Wed, 27 Nov 2002 15:32:15 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id gAR6WAi77442;
	Wed, 27 Nov 2002 15:32:10 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Message-Id: <20021127.153207.82691943.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.FreeBSD.org, nate@root.org
Cc: jhb@freebsd.org
From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0211261251520.86771-100000@root.org>
References: <XFMail.20021126152733.jhb@FreeBSD.org>
	<Pine.BSF.4.21.0211261251520.86771-100000@root.org>
X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 27 Nov 2002 15:32:07 +0900
X-Sequence: acpi-jp 1995
Subject: [acpi-jp 1995] Re: panic from acpiconf -s 4
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: iwasaki@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021111

> On Tue, 26 Nov 2002, John Baldwin wrote:
> > On 26-Nov-2002 Nate Lawson wrote:
> > > While trying to suspend my IBM T23, I ran into a panic.  "acpiconf -s" for
> > > values 1,2,3 does nothing (failing with "acpi0: AcpiGetSleepTypeData
> > > failed - AE_NOT_FOUND").  But acpiconf -s 4 panics. 
> > > 
> > > scsuspend(c3352600,c32cf058,c03f4d6c,c3335d80,0) at scsuspend+0x17
[snip]
> > > syscall(2f,2f,2f,4,3) at syscall+0x28e
> > > 
> > > Perhaps I should try SC_NO_SUSPEND_VTYSWITCH ?
> > 
> > Well, fixing the bug in scsuspend() would be good.  Can you include
> > the actual panic message (I think it's a kernel trap 12 with a fault
> > address of 0x0?  i.e. a NULL pointer deref) and compile a kernel
> > with -g, and use gdb to locate the offending line number?
> 
> It is a null pointer deref.

Hmm, attached patches solve panic?
But I think I want to understand why a null pointer deref occurred.
Could you send me your /etc/rc.conf and kernel config (diff from
GENERIC would be enough) ?

Thanks


Index: syscons_isa.c
===================================================================
RCS file: /home/ncvs/src/sys/isa/syscons_isa.c,v
retrieving revision 1.20
diff -u -r1.20 syscons_isa.c
--- syscons_isa.c	17 Oct 2002 16:09:13 -0000	1.20
+++ syscons_isa.c	27 Nov 2002 05:53:38 -0000
@@ -101,6 +101,9 @@
 	sc_softc_t	*sc;
 
 	sc = &main_softc;
+	if (sc->cur_scp == NULL)
+		return (0);
+
 	sc_cur_scr = sc->cur_scp->index;
 	do {
 		sc_switch_scr(sc, 0);
@@ -121,6 +124,9 @@
 	sc_softc_t	*sc;
 
 	sc = &main_softc;
+	if (sc->cur_scp == NULL)
+		return (0);
+
 	sc_switch_scr(sc, sc_cur_scr);
 
 #endif



