Patch "ACPICA: Fix exception code class checks" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPICA: Fix exception code class checks

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpica-fix-exception-code-class-checks.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 505d619d3db083d6f94600abd9c19efb84aab3cd
Author: Maximilian Luz <luzmaximilian@xxxxxxxxx>
Date:   Fri Jan 15 10:48:18 2021 -0800

    ACPICA: Fix exception code class checks
    
    [ Upstream commit 3dfaea3811f8b6a89a347e8da9ab862cdf3e30fe ]
    
    ACPICA commit 1a3a549286ea9db07d7ec700e7a70dd8bcc4354e
    
    The macros to classify different AML exception codes are broken. For
    instance,
    
      ACPI_ENV_EXCEPTION(Status)
    
    will always evaluate to zero due to
    
      #define AE_CODE_ENVIRONMENTAL      0x0000
      #define ACPI_ENV_EXCEPTION(Status) (Status & AE_CODE_ENVIRONMENTAL)
    
    Similarly, ACPI_AML_EXCEPTION(Status) will evaluate to a non-zero
    value for error codes of type AE_CODE_PROGRAMMER, AE_CODE_ACPI_TABLES,
    as well as AE_CODE_AML, and not just AE_CODE_AML as the name suggests.
    
    This commit fixes those checks.
    
    Fixes: d46b6537f0ce ("ACPICA: AML Parser: ignore all exceptions resulting from incorrect AML during table load")
    Link: https://github.com/acpica/acpica/commit/1a3a5492
    Signed-off-by: Maximilian Luz <luzmaximilian@xxxxxxxxx>
    Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
    Signed-off-by: Erik Kaneda <erik.kaneda@xxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 233a72f169bb7..e1de0fe281644 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -59,11 +59,11 @@ struct acpi_exception_info {
 
 #define AE_OK                           (acpi_status) 0x0000
 
-#define ACPI_ENV_EXCEPTION(status)      (status & AE_CODE_ENVIRONMENTAL)
-#define ACPI_AML_EXCEPTION(status)      (status & AE_CODE_AML)
-#define ACPI_PROG_EXCEPTION(status)     (status & AE_CODE_PROGRAMMER)
-#define ACPI_TABLE_EXCEPTION(status)    (status & AE_CODE_ACPI_TABLES)
-#define ACPI_CNTL_EXCEPTION(status)     (status & AE_CODE_CONTROL)
+#define ACPI_ENV_EXCEPTION(status)      (((status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL)
+#define ACPI_AML_EXCEPTION(status)      (((status) & AE_CODE_MASK) == AE_CODE_AML)
+#define ACPI_PROG_EXCEPTION(status)     (((status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER)
+#define ACPI_TABLE_EXCEPTION(status)    (((status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES)
+#define ACPI_CNTL_EXCEPTION(status)     (((status) & AE_CODE_MASK) == AE_CODE_CONTROL)
 
 /*
  * Environmental exceptions



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux