Patch "ACPI: bus: Ensure that notify handlers are not running after removal" has been added to the 6.2-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    ACPI: bus: Ensure that notify handlers are not running after removal

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-bus-ensure-that-notify-handlers-are-not-running.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 267fccda50a3dec04c2920221770a33d4bd6e71e
Author: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Date:   Fri Apr 14 16:00:48 2023 +0200

    ACPI: bus: Ensure that notify handlers are not running after removal
    
    [ Upstream commit faae443738c6f0dac9b0d3d11d108f6911a989a9 ]
    
    Currently, acpi_device_remove_notify_handler() may return while the
    notify handler being removed is still running which may allow the
    module holding that handler to be torn down prematurely.
    
    Address this issue by making acpi_device_remove_notify_handler() wait
    for the handling of all the ACPI events in progress to complete before
    returning.
    
    Fixes: 5894b0c46e49 ("ACPI / scan: Move bus operations and notification routines to bus.c")
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 7c16bc15e7a14..837cd86d0316b 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -589,6 +589,7 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device,
 		acpi_remove_notify_handler(device->handle, type,
 					   acpi_notify_device);
 	}
+	acpi_os_wait_events_complete();
 }
 
 /* Handle events targeting \_SB device (at present only graceful shutdown) */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux