]> git.baikalelectronics.ru Git - kernel.git/commit
ACPICA: AML Parser: ignore dispatcher error status during table load
authorSchmauss, Erik <erik.schmauss@intel.com>
Thu, 19 Jul 2018 23:33:00 +0000 (16:33 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Jul 2018 11:39:33 +0000 (13:39 +0200)
commit9d8a0fdb63c2bb162314c3e4de3ffb5cb676d7c3
treeaaa00b80b072769a346642c2d5542a30ca360a49
parentf3138ce0ec44ccd7d96f55387002e19cfd8d39de
ACPICA: AML Parser: ignore dispatcher error status during table load

The dispatcher and the executer process the parse nodes During table
load. Error status from the evaluation confuses the AML parser. This
results in the parser failing to complete parsing of the current
scope op which becomes problematic. For the incorrect AML below, _ADR
never gets created.

definition_block(...)
{
   Scope (\_SB)
   {
     Device (PCI0){...}
     Name (OBJ1, 0x0)
     OBJ1 = PCI0 + 5 // Results in an operand error.
   } // \_SB not closed

   // parser looks for \_SB._SB.PCI0, results in AE_NOT_FOUND error
   // Entire scope block gets skipped.
   Scope (\_SB.PCI0)
   {
       Name (_ADR, 0x0)
   }
}

Fix the above error by properly completing the initial \_SB scope
after an error by clearing errors that occur during table load. In
the above case, this means that OBJ1 = PIC0 + 5 is skipped.

Fixes: 862aa418407f (ACPICA: AML parser: attempt to continue loading table after error)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200363
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/psloop.c