Date: Wed, 21 Mar 2012 12:07:22 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Jung-uk Kim <jkim@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233249 - head/sys/amd64/acpica Message-ID: <20120321100722.GP2358@deviant.kiev.zoral.com.ua> In-Reply-To: <201203202037.q2KKbNfK037014@svn.freebsd.org> References: <201203202037.q2KKbNfK037014@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--88pBQ1/6ie/nQzMF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 20, 2012 at 08:37:23PM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Tue Mar 20 20:37:23 2012 > New Revision: 233249 > URL: http://svn.freebsd.org/changeset/base/233249 >=20 > Log: > Fix another witness panic. We cannot enter critical section at all bec= ause > AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 2012= 0215 > (r231844). To evaluate the method, we need malloc(9), which may sleep. You papered over the issue, and not fixed it. If sleep may happen, as it is for malloc, you cannot sleep with interrupts turned off. This would cause a deadlock at best. > =20 > Reported by: bschmidt > MFC after: 3 days >=20 > Modified: > head/sys/amd64/acpica/acpi_wakeup.c >=20 > Modified: head/sys/amd64/acpica/acpi_wakeup.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/acpica/acpi_wakeup.c Tue Mar 20 19:47:59 2012 (r233248) > +++ head/sys/amd64/acpica/acpi_wakeup.c Tue Mar 20 20:37:23 2012 (r233249) > @@ -223,6 +223,7 @@ acpi_sleep_machdep(struct acpi_softc *sc > #ifdef SMP > cpuset_t wakeup_cpus; > #endif > + register_t rf; > ACPI_STATUS status; > int ret; > =20 > @@ -241,8 +242,8 @@ acpi_sleep_machdep(struct acpi_softc *sc > =20 > AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); > =20 > + rf =3D intr_disable(); > intr_suspend(); > - spinlock_enter(); > =20 > if (savectx(susppcbs[0])) { > ctx_fpusave(suspfpusave[0]); > @@ -299,8 +300,8 @@ out: > #endif > =20 > mca_resume(); > - spinlock_exit(); > intr_resume(); > + intr_restore(rf); > =20 > AcpiSetFirmwareWakingVector(0); > =20 --88pBQ1/6ie/nQzMF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9pqFoACgkQC3+MBN1Mb4hWMgCgt1W53qIxfa42yzVRMHRlddSF HekAoNyBEyh/auaQv2lox1qqikB2az2w =2Yja -----END PGP SIGNATURE----- --88pBQ1/6ie/nQzMF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120321100722.GP2358>