android_kernel_oneplus_msm8998/drivers/scsi
Dave Carroll 48b7c436bf scsi: aacraid: Insure command thread is not recursively stopped
[ Upstream commit 1c6b41fb92936fa5facea464d5d7cbf855966d04 ]

If a recursive IOP_RESET is invoked, usually due to the eh_thread
handling errors after the first reset, be sure we flag that the command
thread has been stopped to avoid an Oops of the form;

 [ 336.620256] CPU: 28 PID: 1193 Comm: scsi_eh_0 Kdump: loaded Not tainted 4.14.0-49.el7a.ppc64le #1
 [ 336.620297] task: c000003fd630b800 task.stack: c000003fd61a4000
 [ 336.620326] NIP: c000000000176794 LR: c00000000013038c CTR: c00000000024bc10
 [ 336.620361] REGS: c000003fd61a7720 TRAP: 0300 Not tainted (4.14.0-49.el7a.ppc64le)
 [ 336.620395] MSR: 9000000000009033 <SF,HV,EE,ME,IR,DR,RI,LE> CR: 22084022 XER: 20040000
 [ 336.620435] CFAR: c000000000130388 DAR: 0000000000000000 DSISR: 40000000 SOFTE: 1
 [ 336.620435] GPR00: c00000000013038c c000003fd61a79a0 c0000000014c7e00 0000000000000000
 [ 336.620435] GPR04: 000000000000000c 000000000000000c 9000000000009033 0000000000000477
 [ 336.620435] GPR08: 0000000000000477 0000000000000000 0000000000000000 c008000010f7d940
 [ 336.620435] GPR12: c00000000024bc10 c000000007a33400 c0000000001708a8 c000003fe3b881d8
 [ 336.620435] GPR16: c000003fe3b88060 c000003fd61a7d10 fffffffffffff000 000000000000001e
 [ 336.620435] GPR20: 0000000000000001 c000000000ebf1a0 0000000000000001 c000003fe3b88000
 [ 336.620435] GPR24: 0000000000000003 0000000000000002 c000003fe3b88840 c000003fe3b887e8
 [ 336.620435] GPR28: c000003fe3b88000 c000003fc8181788 0000000000000000 c000003fc8181700
 [ 336.620750] NIP [c000000000176794] exit_creds+0x34/0x160
 [ 336.620775] LR [c00000000013038c] __put_task_struct+0x8c/0x1f0
 [ 336.620804] Call Trace:
 [ 336.620817] [c000003fd61a79a0] [c000003fe3b88000] 0xc000003fe3b88000 (unreliable)
 [ 336.620853] [c000003fd61a79d0] [c00000000013038c] __put_task_struct+0x8c/0x1f0
 [ 336.620889] [c000003fd61a7a00] [c000000000171418] kthread_stop+0x1e8/0x1f0
 [ 336.620922] [c000003fd61a7a40] [c008000010f7448c] aac_reset_adapter+0x14c/0x8d0 [aacraid]
 [ 336.620959] [c000003fd61a7b00] [c008000010f60174] aac_eh_host_reset+0x84/0x100 [aacraid]
 [ 336.621010] [c000003fd61a7b30] [c000000000864f24] scsi_try_host_reset+0x74/0x180
 [ 336.621046] [c000003fd61a7bb0] [c000000000867ac0] scsi_eh_ready_devs+0xc00/0x14d0
 [ 336.625165] [c000003fd61a7ca0] [c0000000008699e0] scsi_error_handler+0x550/0x730
 [ 336.632101] [c000003fd61a7dc0] [c000000000170a08] kthread+0x168/0x1b0
 [ 336.639031] [c000003fd61a7e30] [c00000000000b528] ret_from_kernel_thread+0x5c/0xb4
 [ 336.645971] Instruction dump:
 [ 336.648743] 384216a0 7c0802a6 fbe1fff8 f8010010 f821ffd1 7c7f1b78 60000000 60000000
 [ 336.657056] 39400000 e87f0838 f95f0838 7c0004ac <7d401828> 314affff 7d40192d 40c2fff4
 [ 336.663997] -[ end trace 4640cf8d4945ad95 ]-

So flag when the thread is stopped by setting the thread pointer to NULL.

Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
Reviewed-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:49:07 +02:00
..
aacraid scsi: aacraid: Insure command thread is not recursively stopped 2018-05-30 07:49:07 +02:00
aic7xxx aic7xxx: Fix queue depth handling 2016-04-12 09:08:39 -07:00
aic94xx SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
arcmsr scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware 2016-11-10 16:36:35 +01:00
arm scsi: fas216: fix sense buffer initialization 2018-05-30 07:48:54 +02:00
be2iscsi be2iscsi: set the boot_kset pointer to NULL in case of failure 2016-04-12 09:08:39 -07:00
bfa scsi: bfa: integer overflow in debugfs 2017-12-20 10:05:01 +01:00
bnx2fc scsi: bnx2fc: Fix check in SCSI completion handler for timed out request 2018-05-30 07:48:57 +02:00
bnx2i
csiostor scsi: csiostor: fix use after free in csio_hw_use_fwconfig() 2018-04-13 19:50:08 +02:00
cxgbi scsi: cxgb4i: fix Tx skb leak 2017-12-25 14:22:14 +01:00
cxlflash scsi: cxlflash: Improve EEH recovery time 2017-05-08 07:46:02 +02:00
device_handler scsi: scsi_dh_emc: return success in clariion_std_inquiry() 2017-10-21 17:09:05 +02:00
dpt
esas2r scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
fcoe scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
fnic scsi: fnic: Avoid sending reset to firmware when another reset is in progress 2017-08-06 19:19:47 -07:00
ibmvscsi scsi: ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info 2018-02-28 10:17:22 +01:00
isci scsi: isci: avoid array subscript warning 2017-09-02 07:06:50 +02:00
libfc libfc: Use the correct function name in kernel-doc comment. 2015-11-09 17:15:52 -08:00
libsas scsi: libsas: defer ata device eh commands to libata 2018-05-26 08:48:59 +02:00
lpfc Fix driver usage of 128B WQEs when WQ_CREATE is V1. 2018-03-24 10:58:43 +01:00
megaraid scsi: megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead 2017-09-27 11:00:15 +02:00
mpt3sas scsi: mpt3sas: Do not mark fw_event workqueue as WQ_MEM_RECLAIM 2018-05-30 07:49:03 +02:00
mvsas mvsas: fix misleading indentation 2017-03-18 19:09:58 +08:00
osd
pcmcia
pm8001 SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
qla2xxx scsi: qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion() 2018-05-30 07:48:58 +02:00
qla4xxx scsi: qla4xxx: skip error recovery in case of register disconnect. 2018-05-30 07:48:58 +02:00
snic scsi: snic: Return error code on memory allocation failure 2017-08-06 19:19:47 -07:00
sym53c8xx_2 scsi: sym53c8xx_2: iterator underflow in sym_getsync() 2018-05-30 07:48:57 +02:00
ufs scsi: ufs: Enable quirk to ignore sending WRITE_SAME command 2018-05-30 07:48:57 +02:00
.gitignore
3w-9xxx.c 3w-9xxx: don't unmap bounce buffered commands 2015-10-07 10:24:48 -07:00
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700.c 53c700: fix BUG on untagged commands 2016-07-27 09:47:39 -07:00
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c scsi: advansys: fix uninitialized data access 2018-02-25 11:03:43 +01:00
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_NCR5380.c
atari_scsi.c
atp870u.c
atp870u.h
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c
constants.c scsi: fix upper bounds check of sense key in scsi_sense_key_string() 2016-09-15 08:27:54 +02:00
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c dpt_i2o: fix build warning 2018-02-25 11:03:44 +01:00
dpti.h
dtc.c
dtc.h
eata.c
eata_generic.h
eata_pio.c
eata_pio.h
esp_scsi.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
esp_scsi.h
fdomain.c scsi: fdomain: drop fdomain_pci_tbl when built-in 2018-02-25 11:03:45 +01:00
fdomain.h
FlashPoint.c FlashPoint: fix build warning 2015-11-09 16:32:14 -08:00
g_NCR5380.c ncr5380: shut up gcc indentation warning 2018-02-25 11:03:51 +01:00
g_NCR5380.h
g_NCR5380_mmio.c
gdth.c
gdth.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gvp11.c
gvp11.h
hosts.c Merge branch 'mkp-fixes' into fixes 2015-12-03 09:32:33 -08:00
hpsa.c scsi: hpsa: fix volume offline state 2018-01-23 19:50:15 +01:00
hpsa.h scsi: hpsa: limit outstanding rescans 2017-12-20 10:04:55 +01:00
hpsa_cmd.h scsi: hpsa: update check for logical volume status 2017-12-20 10:04:54 +01:00
hptiop.c
hptiop.h
imm.c
imm.h
in2000.c
in2000.h
initio.c SCSI: initio: remove duplicate module device table 2018-02-25 11:03:45 +01:00
initio.h
ipr.c scsi: ipr: Fix missed EH wakeup 2018-03-22 09:23:21 +01:00
ipr.h ipr: Driver version 2.6.3. 2015-11-09 19:32:41 -05:00
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c
iscsi_tcp.h
jazz_esp.c
Kconfig scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m 2017-05-14 13:32:57 +02:00
lasi700.c
libiscsi.c scsi: libiscsi: Allow sd_shutdown on bad transport 2018-04-13 19:50:13 +02:00
libiscsi_tcp.c
mac53c94.c
mac53c94.h
mac_esp.c scsi: mac_esp: Replace bogus memory barrier with spinlock 2018-03-24 10:58:43 +01:00
mac_scsi.c
Makefile mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs 2015-11-11 19:50:11 -05:00
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c scsi: mvumi: use __maybe_unused to hide pm functions 2018-02-25 11:03:45 +01:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32.c
nsp32.h
nsp32_debug.c
nsp32_io.h
osst.c
osst.h
osst_detect.h
osst_options.h
pas16.c
pas16.h
pmcraid.c SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
pmcraid.h
ppa.c
ppa.h
ps3rom.c
qla1280.c qla1280: Don't allocate 512kb of host tags 2016-05-18 17:06:52 -07:00
qla1280.h
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
scsi.h
scsi_common.c scsi_common: do not clobber fixed sense information 2016-04-12 09:09:05 -07:00
scsi_debug.c scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded 2016-11-10 16:36:35 +01:00
scsi_devinfo.c scsi: devinfo: apply to HP XP the same flags as Hitachi VSP 2018-03-22 09:23:29 +01:00
scsi_dh.c scsi: dh: add new rdac devices 2018-03-22 09:23:29 +01:00
scsi_error.c scsi: fix race between simultaneous decrements of ->host_failed 2016-07-27 09:47:39 -07:00
scsi_ioctl.c
scsi_lib.c scsi: use 'scsi_device_from_queue()' for scsi_dh 2017-03-12 06:37:26 +01:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_pm.c Revert "SCSI: Fix NULL pointer dereference in runtime PM" 2015-12-10 12:24:44 -05:00
scsi_priv.h scsi_dh: fix use-after-free when removing scsi device 2015-10-27 11:22:37 +09:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c scsi: Fix use-after-free 2016-10-28 03:01:31 -04:00
scsi_sysctl.c
scsi_sysfs.c scsi: avoid a permanent stop of the scsi device's request queue 2017-01-09 08:07:48 +01:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c
scsi_transport_iscsi.c scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly 2017-10-05 09:41:44 +02:00
scsi_transport_sas.c scsi_transport_sas: Remove check for SAS expander when querying bay/enclosure IDs. 2015-09-06 11:13:41 -07:00
scsi_transport_spi.c
scsi_transport_srp.c
scsi_typedefs.h
scsicam.c
sd.c scsi: sd: Keep disk read-only when re-reading partition 2018-05-30 07:49:04 +02:00
sd.h sd: Fix rw_max for devices that report an optimal xfer size 2016-10-28 03:01:33 -04:00
sd_dif.c block: Consolidate static integrity profile properties 2015-10-21 14:42:38 -06:00
ses.c scsi: ses: don't get power status of SES device slot on probe 2018-03-22 09:23:24 +01:00
sg.c scsi: sg: allocate with __GFP_ZERO in sg_build_indirect() 2018-05-26 08:49:00 +02:00
sgiwd93.c
sim710.c scsi: sim710: fix build warning 2018-02-25 11:03:44 +01:00
sni_53c710.c
sr.c sr: get/drop reference to device in revalidate and check_events 2018-05-30 07:49:07 +02:00
sr.h
sr_ioctl.c
sr_vendor.c
st.c Merge branch 'mkp-fixes' into fixes 2015-12-03 09:32:33 -08:00
st.h
st_options.h
stex.c stex: Remove use of struct timeval 2015-11-09 17:42:19 -08:00
storvsc_drv.c scsi: storvsc: Increase cmd_per_lun for higher speed devices 2018-05-30 07:48:58 +02:00
sun3_scsi.c
sun3_scsi.h
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
sym53c416.c
sym53c416.h
t128.c
t128.h
u14-34f.c
ultrastor.c
ultrastor.h
virtio_scsi.c scsi: virtio_scsi: always read VPD pages for multiqueue too 2018-04-08 11:51:59 +02:00
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
wd7000.c
xen-scsifront.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
zalon.c
zorro7xx.c