All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
	linux-acpi@vger.kernel.org
Subject: Re: ec locking issue
Date: Fri, 16 Feb 2007 12:54:55 -0500	[thread overview]
Message-ID: <200702161254.55430.lenb@kernel.org> (raw)
In-Reply-To: <45D4BF92.5050401@linux.intel.com>

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@linux.intel.com>
Date:   Thu Feb 15 23:16:18 2007 +0300

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

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 */



  reply	other threads:[~2007-02-16 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 19:26 ec locking issue Dominik Brodowski
2007-02-15 20:16 ` Alexey Starikovskiy
2007-02-16 17:54   ` Len Brown [this message]
2007-02-19 13:44     ` Dominik Brodowski
2007-02-19 21:45       ` Dominik Brodowski
2007-02-20 18:24         ` Alexey Starikovskiy
2007-02-20 19:59           ` Dominik Brodowski
2007-02-20 22:07             ` Alexey Starikovskiy
2007-02-22  1:04               ` Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702161254.55430.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=alexey.y.starikovskiy@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.