Bug: linux/acpi may execute notify handler that has been removed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux