On Thu, 2015-08-13 at 18:48 -0700, Calvin Owens wrote: > 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. > > Cc: Christoph Hellwig <hch@xxxxxx> > Signed-off-by: Calvin Owens <calvinowens@xxxxxx> > --- > Changes in v4: None > > Changes in v3: > * Add a break condition to the REMOVE_UNRESPONDING_DEVICES fw_event, > which can loop over a sleep forever (5m+ at least) at unloading. I > don't think anything prevented this before, but taking the fw_event > object off the list at the top of _firmware_event_work() seems to have > made it more likely to happen. > > Changes in v2: > * Squished patches 4-6 into one patch > * Remove the fw_event from fw_event_list at the start of > _firmware_event_work() > * Explicitly seperate fw_event_list removal from fw_event freeing > > drivers/scsi/mpt2sas/mpt2sas_scsih.c | 112 ++++++++++++++++++++++++++++------- > 1 file changed, 91 insertions(+), 21 deletions(-) > Looks good. Reviewed-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html