]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mpt2sas: Refcount fw_events and fix unsafe list usage
authorCalvin Owens <calvinowens@fb.com>
Fri, 14 Aug 2015 01:48:10 +0000 (18:48 -0700)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 28 Aug 2015 20:14:59 +0000 (13:14 -0700)
commit0f9b74e50d061306f8e7f902007df852992c0dfc
tree7c455324b35c5944e7cb1523d005ae91607564be
parent2757abdc85c199e59bf040f77a67b129c84139b3
mpt2sas: Refcount fw_events and fix unsafe list usage

The fw_event_work struct is concurrently referenced at shutdown, so
add a refcount to protect it, and refactor the code to use it.

Additionally, refactor _scsih_fw_event_cleanup_queue() such that it
no longer iterates over the list without holding the lock, since
_firmware_event_work() concurrently deletes items from the list.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/mpt2sas/mpt2sas_scsih.c