Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2010 11:39:04 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-acpi@freebsd.org
Cc:        Alexander Motin <mav@freebsd.org>
Subject:   Re: Panic on S3 suspend call.
Message-ID:  <201006081139.04417.jhb@freebsd.org>
In-Reply-To: <4C0E12F6.8050600@FreeBSD.org>
References:  <4C0E12F6.8050600@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 08 June 2010 5:52:54 am Alexander Motin wrote:
> Hi.
> 
> Just noted that fresh HEAD i386 system panics on suspend request when
> build with INVARIANTS and WITNESS:
> 
> panic: mutex ACPI global lock owned at ../../../kern/kern_event.c:1899
> cpuid = 1
> KDB: enter: panic
> [ thread pid 1047 tid 100138 ]
> Stopped at      0x408d29df:     movl    $0,0x40dded34
> db> bt
> Tracing pid 1047 tid 100138 td 0x45fcb9c0
> kdb_enter(40c75fe3,40c75fe3,40c74763,7c91fb1c,1,...) at 0x408d29df
> panic(40c74763,40c26898,40c70d4e,76b,7c91fb40,...) at 0x4089ec96
> _mtx_assert(40da08a0,0,40c70d4e,76b,7c91fb70,...) at 0x4088e227
> knlist_mtx_assert_unlocked(40da08a0,4088ed2c,40da08a0,45d377c0,3,...) at
> 0x4086b06e
> knote(45d377dc,0,0,921,0,...) at 0x4086b9ff
> acpi_ReqSleepState(456c3700,3,40c2633d,c76,0,...) at 0x404e8f4b

I think this should fix it:

Index: acpi.c
===================================================================
--- acpi.c	(revision 208893)
+++ acpi.c	(working copy)
@@ -2346,7 +2346,7 @@
 	clone->notify_status = APM_EV_NONE;
 	if ((clone->flags & ACPI_EVF_DEVD) == 0) {
 	    selwakeuppri(&clone->sel_read, PZERO);
-	    KNOTE_UNLOCKED(&clone->sel_read.si_note, 0);
+	    KNOTE_LOCKED(&clone->sel_read.si_note, 0);
 	}
     }

-- 
John Baldwin



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