Re: [PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux