public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Alexey Starikovskiy <astarikovskiy@suse.de>,
	Sitsofe Wheeler <sitsofe@yahoo.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	stable@kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 2.6.28-rc6] ACPICA: don't cond_resched() when irqs_disabled()
Date: Fri, 19 Dec 2008 00:22:06 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0812190016120.6312@localhost.localdomain> (raw)
In-Reply-To: <20081126135508.GA1891@localhost>


On Wed, 26 Nov 2008, Wu Fengguang wrote:

> [add CC to <stable@kernel.org>, since this bug was introduced in the
> 2.6.27-rcX time frame, and should help 2.6.28 and 2.6.27.x alike]

Actually, ACPI_PREEMPTION_POINT() went in to 2.6.28-rc1,
it is not present in 2.6.27.stable so this patch
does not apply to 27.stable.

> The ACPI routines could be called from run_workqueue() with irqs disabled.
> So we should test irqs_disabled() before calling cond_resched().

I don't know how you provoked this failure.
The ACPI interpreter should always be run with interrupts enabled.
If it isn't then that is a (different) bug.

There is, however, one exception, and it is during suspend/resume;
and that _is_ a legal way to provoke this bug:

http://bugzilla.kernel.org/show_bug.cgi?id=12252

and thus the fix is actually correct, and I'll apply it.

thanks,
-- Len Brown, Intel Open Source Technology Center


> --- a/include/acpi/platform/aclinux.h
> +++ b/include/acpi/platform/aclinux.h
> @@ -141,6 +141,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
>  /*
>   * We need to show where it is safe to preempt execution of ACPICA
>   */
> -#define ACPI_PREEMPTION_POINT()	cond_resched()
> +#define ACPI_PREEMPTION_POINT()		\
> +	do {				\
> +		if (!irqs_disabled())	\
> +			cond_resched();	\
> +	} while (0)
>  
>  #endif				/* __ACLINUX_H__ */
> --

  parent reply	other threads:[~2008-12-19  5:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081126063522.GA23611@localhost>
     [not found] ` <20081126135508.GA1891@localhost>
     [not found]   ` <20081126152043.c92ae839.akpm@linux-foundation.org>
2008-12-02  2:45     ` [PATCH 2.6.28-rc6] ACPICA: don't cond_resched() when irqs_disabled() Wu Fengguang
2008-12-19  5:22   ` Len Brown [this message]
2008-12-19  7:02     ` Zhao Yakui
2008-12-19  8:38       ` Len Brown
2008-12-19 11:01         ` Wu Fengguang
2008-12-19 18:24           ` Len Brown
2008-12-20  0:28             ` Wu Fengguang
2008-12-19 13:51         ` Wu Fengguang
2008-12-19 18:35           ` Len Brown
2008-12-20  0:34             ` Wu Fengguang
2009-01-01 19:39           ` Robert Hancock

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=alpine.LFD.2.00.0812190016120.6312@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=astarikovskiy@suse.de \
    --cc=fengguang.wu@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=sitsofe@yahoo.com \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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