linux/Documentation/scsi
Wei Fang 926358013a scsi: fix race between simultaneous decrements of ->host_failed
commit 72d8c36ec3 upstream.

sas_ata_strategy_handler() adds the works of the ata error handler to
system_unbound_wq. This workqueue asynchronously runs work items, so the
ata error handler will be performed concurrently on different CPUs. In
this case, ->host_failed will be decreased simultaneously in
scsi_eh_finish_cmd() on different CPUs, and become abnormal.

It will lead to permanently inequality between ->host_failed and
->host_busy, and scsi error handler thread won't start running. IO
errors after that won't be handled.

Since all scmds must have been handled in the strategy handler, just
remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy after
the strategy handler to fix this race.

Fixes: 50824d6c56 ("[SCSI] libsas: async ata-eh")
Signed-off-by: Wei Fang <fangwei1@huawei.com>
Reviewed-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-08-22 22:38:13 +01:00
..
scsi_transport_srp scsi_transport_srp: Add rport state diagram 2014-01-21 10:46:17 -08:00
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
53c700.txt Doc: 53c700: drop never defined (Kconfig) macros 2011-11-08 10:24:15 +01:00
aacraid.txt [SCSI] aacraid driver update 2009-04-03 09:23:11 -05:00
advansys.txt [SCSI] advansys: Move documentation to Documentation/scsi 2007-10-12 14:39:56 -04:00
aha152x.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
aic7xxx.txt Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
aic79xx.txt Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
arcmsr_spec.txt Typo fixes retrun -> return 2007-10-20 02:13:26 +02:00
bfa.txt [SCSI] bfa: add readme file 2012-02-19 08:09:01 -06:00
bnx2fc.txt [SCSI] bnx2fc: Add driver documentation 2011-09-22 15:10:59 +04:00
BusLogic.txt doc: fix wrong arch/i386 references 2011-06-13 13:43:05 +02:00
ChangeLog.1992-1997 Documentation: remove duplicated words 2006-10-03 22:57:56 +02:00
ChangeLog.arcmsr [SCSI] arcmsr: update version and changelog 2008-03-03 13:10:22 -06:00
ChangeLog.ips Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ChangeLog.lpfc Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
ChangeLog.megaraid Fix common misspellings 2011-03-31 11:26:23 -03:00
ChangeLog.megaraid_sas [SCSI] megaraid_sas: Version and Changelog update 2014-03-15 10:19:21 -07:00
ChangeLog.ncr53c8xx Fix common misspellings 2011-03-31 11:26:23 -03:00
ChangeLog.sym53c8xx Fix common misspellings 2011-03-31 11:26:23 -03:00
ChangeLog.sym53c8xx_2 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cxgb3i.txt [SCSI] cxgb3i: Fix spelling errors in documentation 2009-02-21 20:29:37 -06:00
dc395x.txt Fix typos in Documentation/: 'N'-'P' 2006-10-03 22:52:05 +02:00
dpti.txt Fix typos in Documentation/: 'B'-'C' 2006-10-03 22:46:31 +02:00
dtc3x80.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
FlashPoint.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
g_NCR5380.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hpsa.txt [SCSI] hpsa: export resettable host attribute 2011-03-14 18:44:41 -05:00
hptiop.txt Documentation/scsi/hptiop.txt fix a typo 2013-08-20 12:41:12 +02:00
in2000.txt Fix typos in /Documentation : Misc 2006-11-30 05:21:10 +01:00
libsas.txt [SCSI] libsas: fix domain_device leak 2012-02-19 13:37:47 -06:00
LICENSE.FlashPoint Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
LICENSE.qla2xxx qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
LICENSE.qla4xxx [SCSI] qla4xxx: Update Copyright header 2013-09-03 07:27:54 -07:00
link_power_management_policy.txt [libata] Link power management infrastructure 2007-10-29 11:00:35 -04:00
lpfc.txt Documentation cleanup: trivial misspelling, punctuation, and grammar corrections. 2008-07-26 12:00:06 -07:00
megaraid.txt Fix typos in Documentation/: 'H'-'M' 2006-10-03 22:50:39 +02:00
Mylex.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
ncr53c8xx.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
NinjaSCSI.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
osd.txt [SCSI] osd: Documentation for OSD library 2009-03-12 12:58:09 -05:00
osst.txt Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
ppa.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
qlogicfas.txt [SCSI] remove the obsolete SCSI qlogicisp driver 2005-11-06 12:57:05 -06:00
scsi-changer.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
scsi-generic.txt Documentation: Fix Broken URL "freshmeat" 2012-02-21 11:43:45 +01:00
scsi-parameters.txt scsi: delete the MCA specific drivers and driver code 2012-05-17 19:03:54 -04:00
scsi.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
scsi_eh.txt scsi: fix race between simultaneous decrements of ->host_failed 2016-08-22 22:38:13 +01:00
scsi_fc_transport.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
scsi_mid_low_api.txt [SCSI] Update documentation 2013-12-19 07:39:03 -08:00
st.txt [SCSI] st: raise device limit 2012-09-14 17:59:29 +01:00
sym53c8xx_2.txt Documentation: fix minor typos/spelling 2011-04-04 17:51:47 -07:00
sym53c500_cs.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tmscsim.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
ufs.txt [SCSI] ufshcd: UFS Host controller driver 2012-03-27 08:26:28 +01:00