linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lv Zheng <lv.zheng@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3 1/5] ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic table loading
Date: Mon, 20 Jun 2016 13:57:01 +0300	[thread overview]
Message-ID: <20160620105701.GI1739@lahna.fi.intel.com> (raw)
In-Reply-To: <7422eb351c933c167893534ef7a113220d80dc64.1466413497.git.lv.zheng@intel.com>

On Mon, Jun 20, 2016 at 05:07:22PM +0800, Lv Zheng wrote:
> The new MLC approach invokes MLC per-table basis. But the dynamic loading
> support of this is incorrect because of the lock order:
>  acpi_ns_evaluate
>    acpi_ex_enter_intperter
>      acpi_ns_load_table (triggered by Load opcode)
>        acpi_ns_exec_module_code_list
>          acpi_ex_enter_intperter
> The regression is introduced by the following commit:
>   Commit: 2785ce8d0da1cac9d8f78615e116cf929e9a9123
>   ACPICA Commit: 071eff738c59eda1792ac24b3b688b61691d7e7c
>   Subject: ACPICA: Add per-table execution of module-level code
> This patch fixes this regression by unlocking the interpreter lock before
> invoking MLC. However the unlocking is done to the acpi_ns_load_table(), in
> which, the interpreter lock should be locked by acpi_ns_parse_table() but
> wasn't. Reported by Mika Westerberg. Fixed by Lv Zheng.
> 
> Fixes: 2785ce8d0da1 ("ACPICA: Add per-table execution of module-level code")
> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
>  drivers/acpi/acpica/exconfig.c |    2 ++
>  drivers/acpi/acpica/nsparse.c  |    8 ++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
> index a1d177d..21932d6 100644
> --- a/drivers/acpi/acpica/exconfig.c
> +++ b/drivers/acpi/acpica/exconfig.c
> @@ -108,7 +108,9 @@ acpi_ex_add_table(u32 table_index,
>  
>  	/* Add the table to the namespace */
>  
> +	acpi_ex_exit_interpreter();
>  	status = acpi_ns_load_table(table_index, parent_node);
> +	acpi_ex_enter_interpreter();
>  	if (ACPI_FAILURE(status)) {
>  		acpi_ut_remove_reference(obj_desc);
>  		*ddb_handle = NULL;
> diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
> index f631a47..0d29383 100644
> --- a/drivers/acpi/acpica/nsparse.c
> +++ b/drivers/acpi/acpica/nsparse.c
> @@ -170,6 +170,8 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
>  
>  	ACPI_FUNCTION_TRACE(ns_parse_table);
>  
> +	acpi_ex_enter_interpreter();

I'm getting these:

drivers/acpi/acpica/nsparse.c: In function ‘acpi_ns_parse_table’:
drivers/acpi/acpica/nsparse.c:173:2: error: implicit declaration of function ‘acpi_ex_enter_interpreter’ [-Werror=implicit-function-declaration]
  acpi_ex_enter_interpreter();
  ^
drivers/acpi/acpica/nsparse.c:210:2: error: implicit declaration of function ‘acpi_ex_exit_interpreter’ [-Werror=implicit-function-declaration]
  acpi_ex_exit_interpreter();
  ^
cc1: some warnings being treated as errors

Do I need to have some other patch applied before this?
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-06-20 10:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0e65135af51d94db0410c7059f3bc3a2300fc3b5>
2016-05-13  5:35 ` [PATCH v2 0/4] ACPI 2.0: Enable TermList interpretion for table loading Lv Zheng
2016-05-13  5:35   ` [PATCH v2 1/4] ACPICA: Dispatcher: Fix an issue that the opregions created by the linked MLC were not tracked Lv Zheng
2016-05-13  5:35   ` [PATCH v2 2/4] ACPICA: ACPI 2.0, Interpreter: Fix MLC issues by switching to new TermList grammar for table loading Lv Zheng
2016-05-13  5:35   ` [PATCH v2 3/4] ACPI 2.0 / AML: Enable correct ACPI subsystem initialization order for new table loading mode Lv Zheng
2016-05-13  5:35   ` [PATCH v2 4/4] ACPI 2.0 / AML: Fix module level execution by correctly parsing table as TermList Lv Zheng
2016-05-17  0:29   ` [PATCH v2 0/4] ACPI 2.0: Enable TermList interpretion for table loading Zheng, Lv
2016-05-17 23:23     ` Rafael J. Wysocki
2016-05-20  0:57       ` Zheng, Lv
2016-06-10  1:05         ` Rafael J. Wysocki
2016-06-12  1:02           ` Zheng, Lv
2016-06-13 22:59             ` Rafael J. Wysocki
2016-06-20  9:07 ` [PATCH v3 0/5] " Lv Zheng
2016-06-20  9:07   ` [PATCH v3 1/5] ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic " Lv Zheng
2016-06-20 10:57     ` Mika Westerberg [this message]
2016-06-20 23:13       ` Zheng, Lv
2016-06-20  9:07   ` [PATCH v3 2/5] ACPICA: Dispatcher: Fix an issue that the opregions created by the linked MLC were not tracked Lv Zheng
2016-06-20  9:07   ` [PATCH v3 3/5] ACPICA: ACPI 2.0, Interpreter: Fix MLC issues by switching to new TermList grammar for table loading Lv Zheng
2016-06-20  9:07   ` [PATCH v3 4/5] ACPI 2.0 / AML: Enable correct ACPI subsystem initialization order for new table loading mode Lv Zheng
2016-06-20  9:07   ` [PATCH v3 5/5] ACPI 2.0 / AML: Fix module level execution by correctly parsing table as TermList Lv Zheng
2016-06-21  4:34 ` [PATCH v4 0/5] ACPI 2.0: Enable TermList interpretion for table loading Lv Zheng
2016-06-21  4:34   ` [PATCH v4 1/5] ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic " Lv Zheng
2016-06-21  7:58     ` Mika Westerberg
2016-06-21  9:55       ` Zheng, Lv
2016-06-23  0:41         ` Rafael J. Wysocki
2016-06-21  4:34   ` [PATCH v4 2/5] ACPICA: Dispatcher: Fix an issue that the opregions created by the linked MLC were not tracked Lv Zheng
2016-06-21  4:34   ` [PATCH v4 3/5] ACPICA: ACPI 2.0, Interpreter: Fix MLC issues by switching to new TermList grammar for table loading Lv Zheng
2016-07-04 23:42     ` Zheng, Lv
2016-07-05  0:09       ` Rafael J. Wysocki
2016-06-21  4:34   ` [PATCH v4 4/5] ACPI 2.0 / AML: Enable correct ACPI subsystem initialization order for new table loading mode Lv Zheng
2016-06-21  4:34   ` [PATCH v4 5/5] ACPI 2.0 / AML: Fix module level execution by correctly parsing table as TermList Lv Zheng
2016-09-23  3:26 ` [PATCH v5 0/5] ACPI 2.0: Stop defer-executing module level code Lv Zheng
2016-09-23  3:26   ` [PATCH v5 1/5] ACPICA: Tables: Fix "UNLOAD" code path lock issues Lv Zheng
2016-09-23  3:26   ` [PATCH v5 2/5] ACPICA: Parser: Fix a regression in LoadTable support Lv Zheng
2016-09-23  3:26   ` [PATCH v5 3/5] ACPI 2.0 / AML: Enable correct ACPI subsystem initialization order for new table loading mode Lv Zheng
2016-09-23  3:26   ` [PATCH v5 4/5] ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis Lv Zheng
2016-11-24 21:16     ` Rafael J. Wysocki
2016-09-23  3:27   ` [PATCH v5 5/5] ACPI 2.0 / AML: Fix module level execution by correctly parsing table as TermList Lv Zheng
2016-09-24  0:32   ` [PATCH v5 0/5] ACPI 2.0: Stop defer-executing module level code Rafael J. Wysocki
2016-09-26  7:43     ` Zheng, Lv
2016-09-26 12:57       ` Rafael J. Wysocki

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=20160620105701.GI1739@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=zetalog@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).