* [PATCH] libata-acpi: don't call sleeping function from invalid context
@ 2008-07-10 2:10 Zhang Rui
2008-07-11 13:42 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Rui @ 2008-07-10 2:10 UTC (permalink / raw)
To: linux-acpi; +Cc: hmacht, jeff, Andi Kleen
The problem is introduced by commit
664d080c41463570b95717b5ad86e79dc1be0877.
acpi_evaluate_integer is a sleeping function,
and it should not be called with spin_lock_irqsave.
https://bugzilla.redhat.com/show_bug.cgi?id=451399
Sighed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/ata/libata-acpi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/ata/libata-acpi.c
===================================================================
--- linux-2.6.orig/drivers/ata/libata-acpi.c 2007-05-04 10:57:08.000000000 +0800
+++ linux-2.6/drivers/ata/libata-acpi.c 2008-07-07 11:15:02.000000000 +0800
@@ -195,6 +195,8 @@
/* This device does not support hotplug */
return;
+ status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
+
spin_lock_irqsave(ap->lock, flags);
switch (event) {
@@ -202,7 +204,6 @@
case ACPI_NOTIFY_DEVICE_CHECK:
ata_ehi_push_desc(ehi, "ACPI event");
- status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status)) {
ata_port_printk(ap, KERN_ERR,
"acpi: failed to determine bay status (0x%x)\n",
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libata-acpi: don't call sleeping function from invalid context
2008-07-10 2:10 [PATCH] libata-acpi: don't call sleeping function from invalid context Zhang Rui
@ 2008-07-11 13:42 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-07-11 13:42 UTC (permalink / raw)
To: Zhang Rui; +Cc: linux-acpi, hmacht, Andi Kleen
Zhang Rui wrote:
> The problem is introduced by commit
> 664d080c41463570b95717b5ad86e79dc1be0877.
>
> acpi_evaluate_integer is a sleeping function,
> and it should not be called with spin_lock_irqsave.
> https://bugzilla.redhat.com/show_bug.cgi?id=451399
>
> Sighed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
> drivers/ata/libata-acpi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
applied, with slight change
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-11 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 2:10 [PATCH] libata-acpi: don't call sleeping function from invalid context Zhang Rui
2008-07-11 13:42 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).