ACPI: Fixes device power states array overflow
Subsystems (2)
PATCH v2 1/1 ACPI: Fixes device power states array overflow
Commit 28c2103 added new state ACPI_STATE_D3_COLD, so the device power states array must be expanded by one also.
v2: Use ACPI_D_STATE_COUNT instead of number 5 for the array size.
--- include/acpi/acpi_bus.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acpi_bus.h +1 -1
@@ -210,7 +210,7 @@ struct acpi_device_power_state {struct acpi_device_power {int state;/* Current state */ struct acpi_device_power_flags flags; -struct acpi_device_power_state states[4 ];/* Power states (D0-D3) */ +struct acpi_device_power_state states[ACPI_D_STATE_COUNT ];/* Power states (D0-D3Cold) */ };/* Performance Management */
Signature · 8 lines
1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 24 lines · Lin Ming
Commit 28c2103 added new state
ACPI_STATE_D3_COLD, so the device power states array must be expanded by one also.v2: Use
ACPI_D_STATE_COUNTinstead of number 5 for the array size.Reported-by Dan Carpenter <[email protected]>Suggested-by Oldřich Jedlička <[email protected]>Signed-off-by Lin Ming <[email protected]>---
include/acpi/acpi_bus.h | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)include/acpi/acpi_bus.h +0
-0@@ -210,7 +210,7 @@ struct acpi_device_power_state { struct acpi_device_power {int state; /* Current state */
structacpi_device_power_flagsflags;
- structacpi_device_power_statestates[4]; /* Power states (D0-D3) */
+ structacpi_device_power_statestates[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */ };
Quoted 3 lines
/* Performance Management */
--
1.7.2.3
Len,
Would you apply this one?
Thanks,
Lin Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
applied
thanks,
Len Brown, Intel Open Source Technology Center