aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_init.c
diff options
context:
space:
mode:
authorXiang Chen <[email protected]>2021-12-20 11:21:28 +0000
committerMartin K. Petersen <[email protected]>2021-12-23 04:38:29 +0000
commit29e2bac87421c613782ccb510c76c5efbecac0cf (patch)
tree0fa6ec11ca12251c3c10aa2ec4395b00ac02b32e /drivers/scsi/libsas/sas_init.c
parentscsi: libsas: Add spin_lock/unlock() to protect asd_sas_port->phy_list (diff)
downloadkernel-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