NetBSD Problem Report #45139

From jruohone@gmail.com  Wed Jul 13 10:16:09 2011
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 9500263B904
	for <gnats-bugs@gnats.netbsd.org>; Wed, 13 Jul 2011 10:16:09 +0000 (UTC)
Message-Id: <20110713101603.090C056C5@marx.bitnet>
Date: Wed, 13 Jul 2011 13:16:03 +0300 (EEST)
From: Jukka Ruohonen <jruohonen@iki.fi>
Sender: a b <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@gnats.NetBSD.org
Subject: bugs in ACPI(CA) serialization
X-Send-Pr-Version: 3.95

>Number:         45139
>Category:       kern
>Synopsis:       bugs in ACPI(CA) serialization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 13 10:20:00 +0000 2011
>Last-Modified:  Thu Nov 05 08:29:06 +0000 2020
>Originator:     Jukka Ruohonen
>Release:        NetBSD 5.99.x
>Organization:
none
>Environment:
>Description:

Due changes in ACPICA, several hardware-related functions take spin locks,
initialized in AcpiOsCreateLock() as IPL_VM. Among these are
AcpiWriteBitRegister(), which is used for instance in the suspend code.

For example, AcpiEnterSleepState() must be called with interrupts off at
machine-level (i.e. x86_disable_intr()), yet within the function a spin
lock is acquired.

>How-To-Repeat:

Code inspection.

>Fix:

This may be quite difficult to fix; may require patching ACPICA itself.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Wed, 13 Nov 2019 18:39:55 +0000
Responsible-Changed-Why:
Reminder I want to handle this.
from jared: the semaphore code handles this via quickly exiting if (cold || doing_shutdown || acpi_suspended)
To avoid the problem that we might release a lock we don't own, perhaps we can move setting acpi_suspended to 0 to acpi_md_sleep, so it doesn't run with more than 1 CPU. Or use KERNEL_LOCK.


Responsible-Changed-From-To: maya->kern-bug-people
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Thu, 05 Nov 2020 08:29:06 +0000
Responsible-Changed-Why:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.