Commit:     07ddf768d860bee7bd6581b7af3ce1009dbd05d0
Parent:     7c010de7506954e973abfab5c5999c5a97f7a73e
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 29 17:00:37 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Fri Aug 3 22:28:11 2007 -0400

    ACPI: EC: acpi_ec_remove(): fix use-after-free
    This patch fixes an obvious use-after-free introduced by
    commit 837012ede14a8fc088be3682c964da7fc6af026b.
    Spotted by the Coverity checker.
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Acked-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 drivers/acpi/ec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 71caa7d..b649ac7 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -730,14 +730,14 @@ static int acpi_ec_add(struct acpi_device *device)
 static int acpi_ec_remove(struct acpi_device *device, int type)
        struct acpi_ec *ec;
-       struct acpi_ec_query_handler *handler;
+       struct acpi_ec_query_handler *handler, *tmp;
        if (!device)
                return -EINVAL;
        ec = acpi_driver_data(device);
-       list_for_each_entry(handler, &ec->list, node) {
+       list_for_each_entry_safe(handler, tmp, &ec->list, node) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to