diff options
| author | Xiang Chen <[email protected]> | 2021-12-20 11:21:28 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-12-23 04:38:29 +0000 |
| commit | 29e2bac87421c613782ccb510c76c5efbecac0cf (patch) | |
| tree | 0fa6ec11ca12251c3c10aa2ec4395b00ac02b32e /drivers/scsi/libsas/sas_init.c | |
| parent | scsi: libsas: Add spin_lock/unlock() to protect asd_sas_port->phy_list (diff) | |
| download | kernel-29e2bac87421c613782ccb510c76c5efbecac0cf.tar.gz kernel-29e2bac87421c613782ccb510c76c5efbecac0cf.zip | |
scsi: hisi_sas: Fix some issues related to asd_sas_port->phy_list
Most places that use asd_sas_port->phy_list are protected by spinlock
asd_sas_port->phy_list_lock, however there are still some places which miss
grabbing the lock. Add it in function hisi_sas_refresh_port_id() when
accessing asd_sas_port->phy_list. This carries a risk that list mutates
while at the same time dropping the lock in function
hisi_sas_send_ata_reset_each_phy(). Read asd_sas_port->phy_mask instead of
accessing asd_sas_port->phy_list to avoid this risk.
Link: https://lore.kernel.org/r/[email protected]
Acked-by: John Garry <[email protected]>
Signed-off-by: Xiang Chen <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/libsas/sas_init.c')
0 files changed, 0 insertions, 0 deletions
