diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-09-22 07:05:34 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-16 17:54:02 +0200 |
commit | 1a34c0640137eed8dabdac3a68a7a84116ac9e0d (patch) | |
tree | fbe141523906f19c10c80bbdbdd4a69446c5fa44 /include/scsi | |
parent | [SCSI] bnx2fc: Bumped version to 1.0.8 (diff) | |
download | linux-1a34c0640137eed8dabdac3a68a7a84116ac9e0d.tar.xz linux-1a34c0640137eed8dabdac3a68a7a84116ac9e0d.zip |
[SCSI] libsas: fix port->dev_list locking
port->dev_list maintains a list of devices attached to a given sas root port.
It needs to be mutated under a lock as contexts outside of the
single-threaded-libsas-workqueue access the list via sas_find_dev_by_rphy().
Fixup locations where the list was being mutated without a lock.
This is a follow-up to commit 5911e963 "[SCSI] libsas: remove expander
from dev list on error", where Luben noted [1]:
> 2/ We have unlocked list manipulations in sas_ex_discover_end_dev(),
> sas_unregister_common_dev(), and sas_ex_discover_end_dev()
Yes, I can see that and that is very unfortunate.
[1]: http://marc.info/?l=linux-scsi&m=131480962006471&w=2
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libsas.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index c4b7cd0b85e5..6a308d42d98f 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -656,7 +656,7 @@ int sas_discover_event(struct asd_sas_port *, enum discover_event ev); int sas_discover_sata(struct domain_device *); int sas_discover_end_dev(struct domain_device *); -void sas_unregister_dev(struct domain_device *); +void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *); void sas_init_dev(struct domain_device *); |