diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index 48db0944ce4a..62365f6075dd 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -126,12 +126,29 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * Originally, we checked the table signature for "SSDT" or "PSDT" here. | 129 | * Validate the incoming table signature. |
130 | * Next, we added support for OEMx tables, signature "OEM". | 130 | * |
131 | * Valid tables were encountered with a null signature, so we've just | 131 | * 1) Originally, we checked the table signature for "SSDT" or "PSDT". |
132 | * given up on validating the signature, since it seems to be a waste | 132 | * 2) We added support for OEMx tables, signature "OEM". |
133 | * of code. The original code was removed (05/2008). | 133 | * 3) Valid tables were encountered with a null signature, so we just |
134 | * gave up on validating the signature, (05/2008). | ||
135 | * 4) We encountered non-AML tables such as the MADT, which caused | ||
136 | * interpreter errors and kernel faults. So now, we once again allow | ||
137 | * only "SSDT", "OEMx", and now, also a null signature. (05/2011). | ||
134 | */ | 138 | */ |
139 | if ((table_desc->pointer->signature[0] != 0x00) && | ||
140 | (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) | ||
141 | && (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) { | ||
142 | ACPI_ERROR((AE_INFO, | ||
143 | "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx", | ||
144 | acpi_ut_valid_acpi_name(*(u32 *)table_desc-> | ||
145 | pointer-> | ||
146 | signature) ? table_desc-> | ||
147 | pointer->signature : "????", | ||
148 | *(u32 *)table_desc->pointer->signature)); | ||
149 | |||
150 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | ||
151 | } | ||
135 | 152 | ||
136 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 153 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
137 | 154 | ||