diff options
author | 2023-06-21 16:36:12 -0500 | |
---|---|---|
committer | 2023-06-23 12:28:01 -0500 | |
commit | 5557b62634abbd55bab7b154ce4bca348ad7f96f (patch) | |
tree | 238b913ad2be04a824d3cf9ce19541d74c90f30f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold (diff) | |
download | wireguard-linux-5557b62634abbd55bab7b154ce4bca348ad7f96f.tar.xz wireguard-linux-5557b62634abbd55bab7b154ce4bca348ad7f96f.zip |
PCI/ACPI: Validate acpi_pci_set_power_state() parameter
Previously acpi_pci_set_power_state() assumed the requested power state was
valid (PCI_D0 ... PCI_D3cold). If a caller supplied something else, we
could index outside the state_conv[] array and pass junk to
acpi_device_set_power().
Validate the pci_power_t parameter and return -EINVAL if it's invalid.
Link: https://lore.kernel.org/r/20230621222857.GA122930@bhelgaas
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions