mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: felipe_alfaro@linuxmail.org, linux-kernel@vger.kernel.org,
	andrew.grover@intel.com
Subject: Re: 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context
Date: Sun, 6 Apr 2003 18:21:23 -0700	[thread overview]
Message-ID: <20030406182123.0b8ce4f4.akpm@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.50.0304061847220.2268-100000@montezuma.mastecende.com>

Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> -	if (in_atomic())
> +	if (in_atomic() || irqs_disabled())
>  		timeout = 0;

Andy, why does the ACPI code have this test?

Is it to determine whether a caller of this functon is currently holding a
spinlock?  If so then it will only work on a preemptible kernel.

A non-preempt kernel will not increment preempt_count() when it takes a
spinlock and ACPI could mistakenly schedule away and cause a system deadlock.


  reply	other threads:[~2003-04-07  1:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-06 22:30 Felipe Alfaro Solana
2003-04-06 22:48 ` Zwane Mwaikambo
2003-04-07  1:21   ` Andrew Morton [this message]
2003-04-07  9:29   ` Felipe Alfaro Solana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030406182123.0b8ce4f4.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=andrew.grover@intel.com \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linuxpower.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®