lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2014 12:25:36 -0700
From:	Greg Kroah-Hartman <>
Cc:	Greg Kroah-Hartman <>,, Benjamin Block <>,
	Knut Petersen <>,
	Lan Tianyu <>,
	"Rafael J. Wysocki" <>
Subject: [PATCH 3.16 097/158] ACPI: Run fixed event device notifications in process context

3.16-stable review patch.  If anyone has any objections, please let me know.


From: Lan Tianyu <>

commit 236105db632c6279a020f78c83e22eaef746006b upstream.

Currently, notify callbacks for fixed button events are run from
interrupt context.  That is not necessary and after commit 0bf6368ee8f2
(ACPI / button: Add ACPI Button event via netlink routine) it causes
netlink routines to be called from interrupt context which is not

Also, that is different from non-fixed device events (including
non-fixed button events) whose notify callbacks are all executed from
process context.

For the above reasons, make fixed button device notify callbacks run
in process context which will avoid the deadlock when using netlink
to report button events to user space.

Fixes: 0bf6368ee8f2 (ACPI / button: Add ACPI Button event via netlink routine)
Reported-by: Benjamin Block <>
Reported-by: Knut Petersen <>
Signed-off-by: Lan Tianyu <>
[rjw: Function names, subject and changelog.]
Signed-off-by: Rafael J. Wysocki <>
Signed-off-by: Greg Kroah-Hartman <>

 drivers/acpi/scan.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -920,12 +920,17 @@ static void acpi_device_notify(acpi_hand
 	device->driver->ops.notify(device, event);
-static acpi_status acpi_device_notify_fixed(void *data)
+static void acpi_device_notify_fixed(void *data)
 	struct acpi_device *device = data;
 	/* Fixed hardware devices have no handles */
 	acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
+static acpi_status acpi_device_fixed_event(void *data)
+	acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data);
 	return AE_OK;
@@ -936,12 +941,12 @@ static int acpi_device_install_notify_ha
 	if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)
 		status =
-						     acpi_device_notify_fixed,
+						     acpi_device_fixed_event,
 	else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)
 		status =
-						     acpi_device_notify_fixed,
+						     acpi_device_fixed_event,
 		status = acpi_install_notify_handler(device->handle,
@@ -958,10 +963,10 @@ static void acpi_device_remove_notify_ha
 	if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)
-						acpi_device_notify_fixed);
+						acpi_device_fixed_event);
 	else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)
-						acpi_device_notify_fixed);
+						acpi_device_fixed_event);
 		acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists