Commit:     1544fdbc857cbe8afca16a521d3254346befeb06
Parent:     c9e4172cde0f793dbf48c99bdfd0abe7d18e4b09
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 24 18:26:00 2007 +0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 16:38:02 2007 -0400

    ACPI: EC: fix use-after-free
    This patch fixes a use-after-free introduced by
    commit 30c08574da0ead1a47797ce028218ce5b2de61c7
    (ACPI: EC: Add new query handler to list head)
    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 bf60b24..06b78e5 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -445,9 +445,9 @@ EXPORT_SYMBOL_GPL(acpi_ec_add_query_handler);
 void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
-       struct acpi_ec_query_handler *handler;
+       struct acpi_ec_query_handler *handler, *tmp;
-       list_for_each_entry(handler, &ec->list, node) {
+       list_for_each_entry_safe(handler, tmp, &ec->list, node) {
                if (query_bit == handler->query_bit) {
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