linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: linux/acpi may execute notify handler that has been removed
@ 2007-09-27  3:30 Zhang Rui
  2007-09-27  4:53 ` Alexey Starikovskiy
  2007-09-27  4:54 ` Shaohua Li
  0 siblings, 2 replies; 8+ messages in thread
From: Zhang Rui @ 2007-09-27  3:30 UTC (permalink / raw)
  To: linux-acpi; +Cc: rebort.moore, astarikovskiy

Hi, all,

I found a bug that linux/acpi may execute notify handler that
has been removed.

When a system notify(0~0x7f) is received, linux/acpi will
first invoke the generic system notify handler (acpi_bus_notify)
and then invoke the per-device notify handler if present.

In my case, I add some code in acpi_bus_notify for battery
hotplug support, so that the generic system notify handler will
remove the battery device, including the per-device notify handler
acpi_battery_notify() when receiving notification
ACPI_NOTIFY_EJECT_REQUEST.
But linux/acpi invokes the per-device notify handler soon and
this breaks the system.

Further more, device hot-removal is not the only case to encounter
this bug. For example, linux/acpi receives a notification and adds it
in the workqueue, and then the driver(notify handler) is removed
before kacpid_notify invoke it...

Attachment is the patch for battery hotplug support.
Any ideas about this bug?

Thanks,
Rui

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-09-28  3:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27  3:30 Bug: linux/acpi may execute notify handler that has been removed Zhang Rui
2007-09-27  4:53 ` Alexey Starikovskiy
2007-09-27  5:03   ` Zhang Rui
2007-09-27  4:54 ` Shaohua Li
2007-09-27  6:24   ` Alexey Starikovskiy
2007-09-27  6:10     ` Shaohua Li
2007-09-27  6:33       ` Alexey Starikovskiy
2007-09-28  3:37         ` Zhang Rui

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).