From owner-freebsd-bugs Tue Sep 18 22:10:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 18CC037B425 for ; Tue, 18 Sep 2001 22:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8J5A1q62979; Tue, 18 Sep 2001 22:10:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AC0ED37B415 for ; Tue, 18 Sep 2001 22:03:45 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8J53j859388; Tue, 18 Sep 2001 22:03:45 -0700 (PDT) (envelope-from nobody) Message-Id: <200109190503.f8J53j859388@freefall.freebsd.org> Date: Tue, 18 Sep 2001 22:03:45 -0700 (PDT) From: TOMITA Yoshinori To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/30665: acpi_ec driver does not release its resources when it fails to attach Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30665 >Category: kern >Synopsis: acpi_ec driver does not release its resources when it fails to attach >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 18 22:10:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: TOMITA Yoshinori >Release: 5.0-CURRENT 2001/Sep/11 >Organization: F >Environment: FreeBSD yue 5.0-CURRENT-20010911-JPSNAP FreeBSD 5.0-CURRENT-20010911-JPSNAP #0: Tue Sep 18 20:06:43 JST 2001 root@yue:/usr/src/sys/i386/compile/Yue i386 >Description: (Problem 1) kernel crashes in the function AcpiExTruncateFor32bitTable() in boot time. # This is probably nothing to do with acpi_ec driver. > . > . > . > >How-To-Repeat: On notebook PC, FUJITSU FMV-BIBLO MC4/45C, Install FreeBSD 5.0-CURRENT after 2001/Sep, where ACPI module is loaded from the first. >Fix: For problem 1, here is patch for /usr/src/sys/contrib/dev/acpica --- exutils.c.bak Tue Sep 18 21:11:11 2001 +++ exutils.c Tue Sep 18 21:12:15 2001 @@ -261,6 +261,7 @@ */ if ((!ObjDesc) || (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) || + (!WalkState) || (!WalkState->MethodNode)) { return; >Release-Note: >Audit-Trail: >Unformatted: >acpi_button0: on acpi0 >acpi_acad0: on acpi0 > > >Fatal trap 12: page fault while in kernel mode >fault virtual address = 0x40 >fault code = supervisor read, page not present >instruction pointer = 0x8:0xc0498de7 >stack pointer = 0x10:0xc04e1d18 >frame pointer = 0x10:0xc04e1d18 >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 = 0 (swapper) >kernel: type 12 trap, code=0 >Stopped at AcpiExTruncateFor32bitTable+0x13: cmpl $0,0x40(%eax) > and register value of eax was 0. (Problem 2) kernel crashes while probing acpi_ec.  > . > . > . > acpi_button0: on acpi0 > acpi_acad0: on acpi0 > acpi_cmbat0: on acpi0 > acpi_lid0: on acpi0 > acpi_ec0: port 0x66,0x62 on acpi0 > acpi_ec0: can't install GPE handler for \_SB_.PCI0.EIO_.EC__ - AE_EXIST > deveice_prove_and_attach: acpi_ec0 attach returned 6 > sio0: irq maps: 0x1 0x1 0x1 0x1 > sio0: probe failed test(0): 0 2 4 6 9 > sio0: irq maps: 0x1 0x1 0x1 0x1 > sio0: probe failed test(0): 0 2 4 6 9 > acpi_ec0: port 0x66,0x62 on acpi0 > panic: resource_list_alloc: resource entry is busy > Debugger("panic") > Stopped at Debugger+0x45: pushl %ebx > db> I asked about this in acpi-jp mailing list and Mr Mike said: This is my fault; the acpi_ec driver does not release its resources when it fails to attach. Due to some bad magic, we have to probe ACPI children twice, so when it tries to attach again, we run into a bug in the resource list code (it should just fail, not panic). and advised me to file a PR. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message