Re: ec locking issue

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

 



On Thursday 15 February 2007 15:16, Alexey Starikovskiy wrote:
> Hi,
> 
> ec is locked only in acpi_ec_transaction, and it is only once in your 
> stack.
> I doubt that this patch could change something, but worth a try...
> Is bisect finds something?
> 
> Regards,
>     Alex.
> Dominik Brodowski wrote:
> > Hi,
> >
> > Current kernels (e.g. 2.6.20-git-as-of-yesterday) don't boot for me, and
> > it seems like ACPI is the cause: the last thing I can see in the log is
> >
> > swapper/1 is trying to acquire lock
> > 	&ec->lock
> >
> > but task is already holding lock
> > 	&ec->lock
> >
> > Snippets from the call trace:
> >
> > acpi_ec_transaction
> > acpi_ec_read
> > acpi_ec_space_handler
> > acpi_ev_address_space_dispatch
> > acpi_ex_access_region
> > acpi_ex_field_datum_
> > acpi_ex_extract_from_field
> > ...
> > acpi_ex_ns_evaluate
> > acpi_ev_execute_reg_method
> > acpi_ev_reg_run
> > acpi_ns_walk_namespace
> > acpi_ev_execute_reg_methods
> > acpi_install_address_space_handler
> > acpi_ec_start
> > acpi_start_single_object
> > acpi_device_probe
> > really_probe
> > ...
> > bus_add_driver
> > ...
> > acpi_ec_init

Alexey,
Thanks for the fix -- it is applied.

Dominik,
Did this fix help, or is the problem elsehwere?

thanks,
-Len


commit c24e912b61b1ab2301c59777134194066b06465c
Author: Alexey Starikovskiy <alexey.y.starikovskiy@xxxxxxxxxxxxxxx>
Date:   Thu Feb 15 23:16:18 2007 +0300

    ACPI: ec: add unlock in error path
    
    Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@xxxxxxxxxxxxxxx>
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 743ce27..8f5aaf7 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -280,8 +280,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
 	mutex_lock(&ec->lock);
 	if (ec->global_lock) {
 		status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
-		if (ACPI_FAILURE(status))
+		if (ACPI_FAILURE(status)) {
+			mutex_unlock(&ec->lock);
 			return -ENODEV;
+		}
 	}
 
 	/* Make sure GPE is enabled before doing transaction */


-
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