On Sat, May 28, 2016 at 11:51:11AM +0800, Wei Fang wrote: > async_sas_ata_eh(), which will call scsi_eh_finish_cmd() in some case, > would be performed simultaneously in sas_ata_strategy_handler(). In this > case, ->host_failed may be decreased simultaneously in > scsi_eh_finish_cmd() on different CPUs, and become abnormal. > > It will lead to permanently inequal between ->host_failed and > ->host_busy. Then SCSI error handler thread won't become running, > SCSI errors after that won't be handled forever. > > Use atomic type for ->host_failed to fix this race. Looks fine, Reviewed-by: Christoph Hellwig <hch@xxxxxx> But please also update Documentation/scsi/scsi_eh.txt for this change. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html