]> git.baikalelectronics.ru Git - kernel.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>
Sun, 6 Sep 2015 17:56:17 +0000 (10:56 -0700)
commit00a592c78fe49f77d3ee2ab671c631ee6858d3cd
tree7c455324b35c5944e7cb1523d005ae91607564be
parent84eb86277326624c2ec0f9213db68f8eb5bda951
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>
Tested-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/mpt2sas/mpt2sas_scsih.c