From owner-acpi-jp@jp.freebsd.org  Mon Oct 15 00:47:11 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id AAA72555;
	Mon, 15 Oct 2001 00:47:11 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id AAA72549;
	Mon, 15 Oct 2001 00:47:10 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare/smtpfeed 1.14) with ESMTP/inet id f9EFl0m98637;
	Mon, 15 Oct 2001 00:47:00 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Mon, 15 Oct 2001 00:46:57 +0900 (JST)
Message-Id: <20011015.004657.74755975.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.freebsd.org, haro@h4.dion.ne.jp
Cc: current@FreeBSD.org, msmith@FreeBSD.org, brian@freebsd-services.com,
        iwasaki@jp.FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
In-Reply-To: <20011014233619F.haro@h4.dion.ne.jp>
References: <200110120015.f9C0FcP00724@hak.lan.Awfulhak.org>
	<20011014233619F.haro@h4.dion.ne.jp>
X-Mailer: Mew version 2.0 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
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1345
Subject: [acpi-jp 1345] Re: ACPI panic at boot time in -current
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi, Intel folks.  I've just found the bug in rsutils.c which double
free(); AcpiUtRemoveReference() and ACPI_MEM_FREE().  Here is a fix.

Index: rsutils.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rsutils.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 rsutils.c
--- rsutils.c	4 Oct 2001 23:12:13 -0000	1.1.1.7
+++ rsutils.c	14 Oct 2001 15:23:13 -0000
@@ -490,7 +490,6 @@
      */
 Cleanup:
 
-    ACPI_MEM_FREE (ByteStream);
     return_ACPI_STATUS (Status);
 }


I suspect that this should be removed in ACPICA 20010831-to-20010920
changes.

Matsuda-san, thanks.  I missed the original mail in current ML written
by brian.

Thanks

> Hi all,
> 
> From: Brian Somers <brian@freebsd-services.com>
> Date: Fri, 12 Oct 2001 01:15:38 +0100
> ::Hi,
> ::
> ::I was wondering if anybody has any suggestions about why this might 
> ::be happening in -current:
> <cut>
> ::pccbb1: <RF5C478 PCI-CardBus Bridge> irq 0 at device 10.1 on pci0
> ::pccbb1: PCI Memory allocated: 10001000
> ::acpi_pcib0: possible interrupts:  9
> ::panic: free: multiple freed item 0xc14f75f0
> ::Debugger("panic")
> ::Stopped at      Debugger+0x44:  pushl   %ebx
> ::db> t         
> 
> I also get the same kind of panic, after import of ACPICA 20010920 snapshot. 
> If I boot very current kernel with old acpi.ko based on 20010831 snapshot,
> system boots up just fine.
> 
> Panic message from current kernel with acpi.ko based on 20010920 snapshot:
> -----8<---------8<---------8<---------8<---------8<---------8<---------8<----
> uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xfc60-0xfc7f at device 7.
> 2 on pci0
> acpi_pcib0: possible interrupts:  9
> panic: free: multiple freed item 0xc13843d0
> Debugger("panic")
> Stopped at      Debugger+0x44:  pushl   %ebx
> db>
> -----8<---------8<---------8<---------8<---------8<---------8<---------8<----
> 
> Related dmesg from the same kernel with old acpi.ko based on 20010831 snapshot:
> -----8<---------8<---------8<---------8<---------8<---------8<---------8<----
> uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xfc60-0xfc7f at device 7.2 on pci0
> acpi_pcib0: matched entry for 0.7.INTD (source \\_SB_.LNKD)
> acpi_pcib0: possible interrupts:  9
> acpi_pcib0: routed interrupt 9 via \\_SB_.LNKD
> usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
> usb0: USB revision 1.0
> uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhub1: Philips Semiconductors hub, class 9/0, rev 1.10/1.10, addr 2
> uhub1: 3 ports with 3 removable, self powered
> -----8<---------8<---------8<---------8<---------8<---------8<---------8<----
> 
> Hope this helps,
>   Haro
> =------------------------------------------------------------------------------
>            _ _    Munehiro (haro) Matsuda
>  -|- /_\  |_|_|   Business Incubation Dept., Kubota Corp.
>  /|\ |_|  |_|_|   1-3 Nihonbashi-Muromachi 3-Chome
>                   Chuo-ku Tokyo 103-8310, Japan
>                   Tel: +81-3-3245-3318  Fax: +81-3-3245-3315
>                   Email: haro@kubota.co.jp
