All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Octavian Purdila <octavian.purdila@intel.com>,
	linus.walleij@linaro.org, lee.jones@linaro.org,
	rjw@rjwysocki.net
Cc: johan@kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	heikki.krogerus@intel.com, mika.westerberg@linux.intel.com,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/4] ACPICA: take ACPI_MTX_INTERPRETER in acpi_unload_table_id
Date: Tue, 16 Dec 2014 21:14:14 +0300	[thread overview]
Message-ID: <54907676.4050108@cogentembedded.com> (raw)
In-Reply-To: <1418746353-3481-2-git-send-email-octavian.purdila@intel.com>

Hello.

On 12/16/2014 07:12 PM, Octavian Purdila wrote:

> acpi_tb_delete_namespace_by_owner expects ACPI_MTX_INTERPRETER to be
> taken. This fixes the following issue:

> ACPI Error: Mutex [0x0] is not acquired, cannot release (20141107/utmutex-322)
> Call Trace:
>    [<ffffffff81b0bd28>] dump_stack+0x4f/0x7b
>    [<ffffffff81546bfc>] acpi_ut_release_mutex+0x47/0x67
>    [<ffffffff81542cf1>] acpi_tb_delete_namespace_by_owner+0x57/0x8d
>    [<ffffffff81543ef1>] acpi_unload_table_id+0x3a/0x5e

> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
> ---
>   drivers/acpi/acpica/tbxface.c | 7 +++++++
>   1 file changed, 7 insertions(+)

> diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
> index 6482b0d..9520ae1 100644
> --- a/drivers/acpi/acpica/tbxface.c
> +++ b/drivers/acpi/acpica/tbxface.c
> @@ -281,6 +281,11 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
>
>   	ACPI_FUNCTION_TRACE(acpi_unload_table_id);
>
> +	status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER);
> +	if (ACPI_FAILURE(status)) {
> +		return_ACPI_STATUS(status);
> +	}

    {} not needed here. Please run your patches thru scripts/checkpatch.pl, it 
should complain in this case.

> +
>   	/* Find table in the global table list */
>   	for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
>   		if (id != acpi_gbl_root_table_list.tables[i].owner_id) {
> @@ -297,6 +302,8 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
>   		acpi_tb_set_table_loaded_flag(i, FALSE);
>   		break;
>   	}
> +
> +	(void)acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);

    Cast to *void*  not necessary either.

[...]

WBR, Sergei


  reply	other threads:[~2014-12-16 18:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 16:12 [PATCH 0/4] dln2: add support for ACPI Octavian Purdila
2014-12-16 16:12 ` [PATCH 1/4] ACPICA: take ACPI_MTX_INTERPRETER in acpi_unload_table_id Octavian Purdila
2014-12-16 18:14   ` Sergei Shtylyov [this message]
2014-12-16 19:32     ` Octavian Purdila
2015-01-22  6:37   ` [RFC PATCH] ACPI: Introduce acpi_unload_parent_table() usages in Linux kernel Lv Zheng
2015-01-22  6:37     ` Lv Zheng
2015-01-22 22:43     ` Rafael J. Wysocki
2015-01-22 22:43       ` Rafael J. Wysocki
2015-01-22 22:43       ` Bjorn Helgaas
2015-01-22 22:43         ` Bjorn Helgaas
2015-01-26  1:59       ` Zheng, Lv
2015-01-26  1:59         ` Zheng, Lv
2015-01-26  1:59         ` Zheng, Lv
     [not found]   ` <1418746353-3481-2-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-01-30  0:03     ` [PATCH 1/4] ACPICA: take ACPI_MTX_INTERPRETER in acpi_unload_table_id Rafael J. Wysocki
2015-01-30  0:03       ` Rafael J. Wysocki
2014-12-16 16:12 ` [PATCH 2/4] ACPICA: don't release ACPI_MTX_TABLES in acpi_tb_install_standard_table Octavian Purdila
2014-12-16 16:12 ` [PATCH 3/4] mfd: dln2: add support for ACPI Octavian Purdila
2015-01-20 15:20   ` Lee Jones
2015-01-20 15:20     ` Lee Jones
2015-01-22  2:00   ` Rafael J. Wysocki
2015-01-22 10:13     ` Octavian Purdila
2015-01-22 22:09       ` Rafael J. Wysocki
2015-01-23  6:47         ` Octavian Purdila
2015-01-23 15:19           ` Rafael J. Wysocki
2014-12-16 16:12 ` [PATCH 4/4] gpio: dln2: add support for ACPI pin configuration Octavian Purdila

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=54907676.4050108@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=heikki.krogerus@intel.com \
    --cc=johan@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=octavian.purdila@intel.com \
    --cc=rjw@rjwysocki.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.