aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memcpy.c
diff options
context:
space:
mode:
authorHeiner Kallweit <[email protected]>2023-10-11 09:46:45 +0200
committerBjorn Helgaas <[email protected]>2023-10-24 16:50:30 -0500
commit8e37372ad0bea4c9b4712d9943f6ae96cff9491f (patch)
tree6cf0a0128ab1f94963def5eba6d1a887ebdb8c78 /lib/test_fortify/write_overflow-memcpy.c
parent3cb4f534bac010258b2688395c2f13459a932be9 (diff)
PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common()
aspm_attr_store_common(), which handles sysfs control of ASPM, has the same problem as fb097dcd5a28 ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver disables L1"): disabling L1 adds only ASPM_L1 (but not any of the L1.x substates) to the "aspm_disable" mask. Enabling one substate, e.g., L1.1, via sysfs removes ASPM_L1 from the disable mask. Since disabling L1 via sysfs doesn't add any of the substates to the disable mask, enabling L1.1 actually enables *all* the substates. In this scenario: - Write 0 to "l1_aspm" to disable L1 - Write 1 to "l1_1_aspm" to enable L1.1 the intention is to disable L1 and all L1.x substates, then enable just L1.1, but in fact, *all* L1.x substates are enabled. Fix this by explicitly disabling all the L1.x substates when disabling L1. Fixes: 72ea91afbfb0 ("PCI/ASPM: Add sysfs attributes for controlling ASPM link states") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiner Kallweit <[email protected]> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <[email protected]> Cc: [email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions