diff options
author | Bob Moore <robert.moore@intel.com> | 2009-02-18 01:28:02 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-26 16:38:25 -0400 |
commit | ac0c84502697114a378057eed83a9baba879cfc9 (patch) | |
tree | 83d1533a4783e6b5ffe5385a7dead57f1dfcf7bb /include/acpi | |
parent | aefc7f9a0220a40beff9b6b3b320cbeae128d0e3 (diff) |
ACPICA: Fix parameter validation for acpi_read/write
Now return AE_BAD_PARAMETER if the input register pointer is
null, and AE_BAD_ADDRESS if the register has an address of zero.
Previously, these cases simply returned AE_OK. For optional
registers such as PM1B status/enable/control, the caller should
check for a valid register address before calling. ACPICA BZ 748.
http://www.acpica.org/bugzilla/show_bug.cgi?id=748
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acexcep.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index eda04546cdf6..473d584b1d31 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -103,8 +103,9 @@ | |||
103 | #define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) | 103 | #define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) |
104 | #define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) | 104 | #define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) |
105 | #define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) | 105 | #define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) |
106 | #define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) | ||
106 | 107 | ||
107 | #define AE_CODE_PGM_MAX 0x0008 | 108 | #define AE_CODE_PGM_MAX 0x0009 |
108 | 109 | ||
109 | /* | 110 | /* |
110 | * Acpi table exceptions | 111 | * Acpi table exceptions |
@@ -224,7 +225,8 @@ char const *acpi_gbl_exception_names_pgm[] = { | |||
224 | "AE_BAD_HEX_CONSTANT", | 225 | "AE_BAD_HEX_CONSTANT", |
225 | "AE_BAD_OCTAL_CONSTANT", | 226 | "AE_BAD_OCTAL_CONSTANT", |
226 | "AE_BAD_DECIMAL_CONSTANT", | 227 | "AE_BAD_DECIMAL_CONSTANT", |
227 | "AE_MISSING_ARGUMENTS" | 228 | "AE_MISSING_ARGUMENTS", |
229 | "AE_BAD_ADDRESS" | ||
228 | }; | 230 | }; |
229 | 231 | ||
230 | char const *acpi_gbl_exception_names_tbl[] = { | 232 | char const *acpi_gbl_exception_names_tbl[] = { |