android_kernel_oneplus_msm8998/Documentation/scsi
Wei Fang 273e129267 scsi: fix race between simultaneous decrements of ->host_failed
commit 72d8c36ec364c82bf1bf0c64dfa1041cfaf139f7 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-07-27 09:47:39 -07: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
aacraid.txt
advansys.txt
aha152x.txt
aic7xxx.txt
aic79xx.txt
arcmsr_spec.txt
bfa.txt
bnx2fc.txt
BusLogic.txt
ChangeLog.1992-1997
ChangeLog.arcmsr
ChangeLog.ips
ChangeLog.lpfc
ChangeLog.megaraid
ChangeLog.megaraid_sas megaraid_sas: Version and Changelog update 2014-09-16 09:09:54 -07:00
ChangeLog.ncr53c8xx
ChangeLog.sym53c8xx
ChangeLog.sym53c8xx_2
cxgb3i.txt
dc395x.txt
dpti.txt
dtc3x80.txt
FlashPoint.txt
g_NCR5380.txt
hpsa.txt
hptiop.txt Documentation/scsi/hptiop.txt fix a typo 2013-08-20 12:41:12 +02:00
in2000.txt
libsas.txt libsas: remove task_collector mode 2014-11-27 16:40:24 +01:00
LICENSE.FlashPoint
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
lpfc.txt
megaraid.txt
Mylex.txt
ncr53c8xx.txt genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely 2015-03-05 20:53:06 +01:00
NinjaSCSI.txt
osd.txt Boaz Harrosh - fix email in Documentation 2014-10-19 20:36:36 +03:00
osst.txt
ppa.txt
qlogicfas.txt
scsi-changer.txt
scsi-generic.txt
scsi-parameters.txt
scsi.txt
scsi_eh.txt scsi: fix race between simultaneous decrements of ->host_failed 2016-07-27 09:47:39 -07:00
scsi_fc_transport.txt
scsi_mid_low_api.txt Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
st.txt st: allow debug output to be enabled or disabled via sysfs 2015-11-09 17:17:27 -08:00
sym53c8xx_2.txt
sym53c500_cs.txt
tmscsim.txt genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely 2015-03-05 20:53:06 +01:00
ufs.txt
wd719x.txt wd719x: Add firmware documentation 2014-11-25 15:42:55 +01:00