ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CAJZ5v0j1TSF39Y5xt4T3OsTfOFjafUiXvQOAjedxV8sA0Mn6-w@mail.gmail.com
Quoted 19 lines
-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Sunday, August 12, 2018 2:47 AM
To: Schmauss, Erik <[email protected]>
Cc: ACPI Devel Maling List <[email protected]>; Rafael J. Wysocki <[email protected]>
Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failureQuoted 6 lines · Erik Schmauss
This change skips the entire length of opcodes that open a scope (Device, Scope, Processor, etc) if the creation of the op fails. The failure could be caused by various errors including
AE_ALREADY_EXISTSandAE_NOT_FOUND.
Quoted 6 lines
Quoted 3 lines
Reported-by Jeremy Linton <[email protected]>Tested-by Jeremy Linton <[email protected]>Signed-off-by Erik Schmauss <[email protected]>I think that we should propagate this fix to the "stable" kernel series, at least 4.17.y and newer. Do you agree?
Yes, I agree.
Hi Greg, please add this to the stable kernel
Quoted 56 lines
drivers/acpi/acpica/psloop.c acpi_status acpi_ps_parse_loop(struct
Quoted 18 lines
--- drivers/acpi/acpica/psloop.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/drivers/acpi/acpica/psloop.cindex20b6142da183..358fcdd1f8a5100644drivers/acpi/acpica/psloop.c +1
-0@@ -22,6 +22,7 @@#include "acdispat.h" #include "amlcode.h" #include "acconvert.h" +#include "acnamesp.h" #define _COMPONENT ACPI_PARSERACPI_MODULE_NAME ("psloop" )@@ -527,12 +528,18 @@ acpi_status acpi_ps_parse_loop(struct
acpi_walk_state*walk_state)drivers/acpi/acpica/psloop.c acpi_status acpi_ps_parse_loop(struct
Quoted 25 lines
drivers/acpi/acpica/psloop.c +12
-4if (ACPI_FAILURE (status)) {return_ACPI_STATUS (status); } -if (walk_state->opcode ==AML_SCOPE_OP ) { +if (acpi_ns_opens_scope + (acpi_ps_get_opcode_info + + (walk_state->opcode)->object_type)) {/* -* If the scope op fails to parse, skip the body of the -* scope op because the parse failure indicates that the -* device may not exist. +* If the scope/device op fails to parse, skip the body of +* the scope op because the parse failure indicates that +* the device may not exist. */ +ACPI_ERROR ((AE_INFO , +"Skip parsing opcode %s" , +acpi_ps_get_opcode_name + + (walk_state->opcode))); walk_state->parser_state.aml = walk_state->aml +1 ; walk_state->parser_state.aml =@@ -540,8 +547,6 @@ acpi_status acpi_ps_parse_loop(struct
acpi_walk_state*walk_state)Quoted 11 lines
drivers/acpi/acpica/psloop.c +0
-3(&walk_state->parser_state); walk_state->aml = walk_state->parser_state.aml; -ACPI_ERROR ((AE_INFO , -"Skipping Scope block" )); }continue ; --2.17.1
Quoted 23 lines · Erik
Quoted 23 lines
-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Sunday, August 12, 2018 2:47 AM
To: Schmauss, Erik <[email protected]>
Cc: ACPI Devel Maling List <[email protected]>; Rafael J. Wysocki <[email protected]>
Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failureQuoted 9 lines · Erik Schmauss
This change skips the entire length of opcodes that open a scope (Device, Scope, Processor, etc) if the creation of the op fails. The failure could be caused by various errors including
AE_ALREADY_EXISTSandAE_NOT_FOUND.Reported-by Jeremy Linton <[email protected]>Tested-by Jeremy Linton <[email protected]>Signed-off-by Erik Schmauss <[email protected]>
Quoted 6 lines
Quoted 2 lines
I think that we should propagate this fix to the "stable" kernel series, at least 4.17.y and newer. Do you agree?
Yes, I agree.
Hi Greg, please add this to the stable kernel
What commit id should I add to the stable kernel?
thanks,
greg k-h
Rafael J. Wysocki
maintainerQuoted 25 lines · Greg KH
Quoted 23 lines · Erik
Quoted 23 lines
-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Sunday, August 12, 2018 2:47 AM
To: Schmauss, Erik <[email protected]>
Cc: ACPI Devel Maling List <[email protected]>; Rafael J. Wysocki <[email protected]>
Subject: Re: [PATCH 05/11] ACPICA: AML Parser: skip opcodes that open a scope upon parse failureQuoted 9 lines · Erik Schmauss
This change skips the entire length of opcodes that open a scope (Device, Scope, Processor, etc) if the creation of the op fails. The failure could be caused by various errors including
AE_ALREADY_EXISTSandAE_NOT_FOUND.Reported-by Jeremy Linton <[email protected]>Tested-by Jeremy Linton <[email protected]>Signed-off-by Erik Schmauss <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I think that we should propagate this fix to the "stable" kernel series, at least 4.17.y and newer. Do you agree?
Yes, I agree.
Hi Greg, please add this to the stable kernel
What commit id should I add to the stable kernel?
It's not in the mainline yet.
I asked whether or not I should add a "Cc: stable" tag to this patch when applying it. :-)
Cheers,
Rafael