Re: [PATCH] ata: libata-sata: fix ata_scsi_lpm_supported() iteration

Damien Le Moal <[email protected]> Wed, 29 Jul 2026 10:49:13 +0900
Newsgroups gmane.linux.kernel.stable,gmane.linux.ide
Organization Western Digital Research
Message-ID <[email protected]>
On 7/28/26 20:38, Niklas Cassel wrote:
> The inner loop of ata_scsi_lpm_supported() user the wrong variable when
> iterating.
> 
> It should obviously use the link that we are currently iterating over,
> rather than always using the host link.
> 
> ata_scsi_lpm_supported() is used to control if a user should be allowed
> to change lpm policy (from the default) via sysfs.
> 
> Thus, this bug could potentially disallow users to change the LPM policy
> for certain SATA devices via sysfs.
> 
> Cc: [email protected]
> Fixes: 0060beec0bfa ("ata: libata-sata: Add link_power_management_supported sysfs attribute")
> Reported-by: Sashiko <[email protected]>
> Link: https://lore.kernel.org/linux-ide/[email protected]/
> Signed-off-by: Niklas Cassel <[email protected]>

Applied to for-7.2-fixes, with the message typo fixed. Thanks!


-- 
Damien Le Moal
Western Digital Research