svn commit: r233249 - head/sys/amd64/acpica

Konstantin Belousov kostikbel at gmail.com
Wed Mar 21 10:07:29 UTC 2012


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
> 
> Log:
>   Fix another witness panic.  We cannot enter critical section at all because
>   AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215
>   (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.

>   
>   Reported by:	bschmidt
>   MFC after:	3 days
> 
> Modified:
>   head/sys/amd64/acpica/acpi_wakeup.c
> 
> Modified: head/sys/amd64/acpica/acpi_wakeup.c
> ==============================================================================
> --- 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;
>  
> @@ -241,8 +242,8 @@ acpi_sleep_machdep(struct acpi_softc *sc
>  
>  	AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc));
>  
> +	rf = intr_disable();
>  	intr_suspend();
> -	spinlock_enter();
>  
>  	if (savectx(susppcbs[0])) {
>  		ctx_fpusave(suspfpusave[0]);
> @@ -299,8 +300,8 @@ out:
>  #endif
>  
>  	mca_resume();
> -	spinlock_exit();
>  	intr_resume();
> +	intr_restore(rf);
>  
>  	AcpiSetFirmwareWakingVector(0);
>  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120321/f928146b/attachment.pgp


More information about the svn-src-all mailing list