1
0
Fork 0
remarkable-linux/drivers
Dave Carroll 3de235c775 scsi: aacraid: Insure command thread is not recursively stopped
[ Upstream commit 1c6b41fb92 ]

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-25 16:17:50 +02:00
..
accessibility License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi ACPI / button: make module loadable when booted in non-ACPI mode 2018-05-09 09:51:49 +02:00
amba ARM: amba: Don't read past the end of sysfs "driver_override" buffer 2018-05-01 12:58:21 -07:00
android ANDROID: binder: prevent transactions into own process. 2018-05-01 12:58:20 -07:00
ata libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs 2018-05-16 10:10:26 +02:00
atm atm: zatm: Fix potential Spectre v1 2018-05-16 10:10:29 +02:00
auxdisplay auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-07 11:12:20 -08:00
base x86/bugs: Expose /sys/../spec_store_bypass 2018-05-22 18:54:02 +02:00
bcma License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block loop: fix LOOP_GET_STATUS lock imbalance 2018-05-25 16:17:35 +02:00
bluetooth Bluetooth: btusb: Add device ID for RTL8822BE 2018-05-25 16:17:42 +02:00
bus sunxi-rsb: Include OF based modalias in device uevent 2018-01-10 09:31:19 +01:00
cdrom cdrom: information leak in cdrom_ioctl_media_changed() 2018-04-29 11:33:16 +02:00
char virtio_console: reset on out of memory 2018-05-01 12:58:12 -07:00
clk clk: bcm2835: De-assert/assert PLL reset signal when appropriate 2018-04-24 09:36:34 +02:00
clocksource clocksource/imx-tpm: Correct -ETIME return condition check 2018-04-26 11:02:02 +02:00
connector
cpufreq cpufreq: powernv: Fix hardlockup due to synchronous smp_call in timer interrupt 2018-05-01 12:58:24 -07:00
cpuidle cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:26:30 +01:00
crypto crypto: inside-secure - fix the invalidation step during cra_exit 2018-05-25 16:17:46 +02:00
dax dev/dax: fix uninitialized variable build warning 2017-12-20 10:10:34 +01:00
dca
devfreq PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-04-12 12:32:13 +02:00
dio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma dmaengine: at_xdmac: fix rare residue corruption 2018-04-24 09:36:32 +02:00
dma-buf dma-buf/fence: Fix lock inversion within dma-fence-array 2018-03-19 08:42:47 +01:00
edac x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type 2018-04-19 08:56:20 +02:00
eisa License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extcon extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO 2018-04-24 09:36:29 +02:00
firewire firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-04-26 11:02:03 +02:00
firmware firmware: dmi_scan: Fix handling of empty DMI strings 2018-04-26 11:02:16 +02:00
fmc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fpga fpga-manager: altera-ps-spi: preserve nCONFIG state 2018-05-01 12:58:24 -07:00
fsi
gpio gpio: fix error path in lineevent_create 2018-05-16 10:10:26 +02:00
gpu drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk 2018-05-22 18:53:59 +02:00
hid HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() 2018-04-26 11:02:10 +02:00
hsi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv Drivers: hv: vmbus: do not mark HV_PCIE as perf_device 2018-04-19 08:56:16 +02:00
hwmon hwmon: (ina2xx) Fix access to uninitialized mutex 2018-04-19 08:56:20 +02:00
hwspinlock License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hwtracing coresight: Fix disabling of CoreSight TPIU 2018-03-24 11:01:26 +01:00
i2c i2c: designware: fix poll-after-enable regression 2018-05-22 18:53:58 +02:00
ide ide: ide-atapi: fix compile error with defining macro DEBUG 2017-12-17 15:08:00 +01:00
idle Revert "x86/mm: Stop calling leave_mm() in idle code" 2017-11-04 15:01:50 +01:00
iio iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() 2018-03-28 18:24:49 +02:00
infiniband iw_cxgb4: Atomically flush per QP HW CQEs 2018-05-09 09:51:53 +02:00
input Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro 2018-05-09 09:51:51 +02:00
iommu iommu/vt-d: Use domain instead of cache fetching 2018-04-26 11:02:06 +02:00
ipack
irqchip irqchip/qcom: Fix check for spurious interrupts 2018-05-09 09:51:56 +02:00
isdn License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
leds leds: pm8058: Silence pointer to integer size warning 2018-03-19 08:42:50 +01:00
lightnvm lightnvm: pblk: protect line bitmap while submitting meta io 2017-12-20 10:10:38 +01:00
macintosh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mailbox mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready 2017-12-14 09:53:12 +01:00
mcb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
md dm integrity: use kvfree for kvmalloc'd memory 2018-05-16 10:10:27 +02:00
media media: em28xx: USB bulk packet size fix 2018-05-25 16:17:42 +02:00
memory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memstick License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
message scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() 2018-05-25 16:17:47 +02:00
mfd mfd: twl6040: Fix child-node lookup 2017-12-29 17:53:46 +01:00
misc cxl: Fix possible deadlock when processing page faults from cxllib 2018-04-24 09:36:32 +02:00
mmc mmc: sdhci-pci: Only do AMD tuning for HS200 2018-04-24 09:36:38 +02:00
mtd mtd: rawnand: tango: Fix struct clk memory leak 2018-05-01 12:58:19 -07:00
mux mux: core: fix double get_device() 2018-01-17 09:45:27 +01:00
net net-usb: add qmi_wwan if on lte modem wistron neweb d18q1 2018-05-25 16:17:38 +02:00
nfc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ntb ntb_transport: Fix bug with max_mw_size parameter 2018-04-26 11:02:13 +02:00
nubus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvdimm libnvdimm, namespace: use a safe lookup for dimm device name 2018-04-24 09:36:32 +02:00
nvme nvme: add quirk to force medium priority for SQ creation 2018-05-16 10:10:30 +02:00
nvmem License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
of earlycon: Use a pointer table to fix __earlycon_table stride 2018-05-01 12:58:24 -07:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
parisc parisc: Hide Diva-built-in serial aux and graphics card 2017-12-29 17:53:47 +01:00
parport parport_pc: Add support for WCH CH382L PCI-E single parallel port card. 2018-04-08 14:26:31 +02:00
pci PCI / PM: Check device_may_wakeup() in pci_enable_wake() 2018-05-16 10:10:29 +02:00
pcmcia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS 2018-04-24 09:36:23 +02:00
pinctrl Revert "pinctrl: intel: Initialize GPIO properly when used through irqchip" 2018-04-29 11:33:09 +02:00
platform platform/x86: asus-wireless: Fix NULL pointer dereference 2018-05-09 09:51:55 +02:00
pnp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
power power: supply: axp288_charger: Properly stop work on probe-error / remove 2018-04-12 12:32:17 +02:00
powercap
pps drivers/pps: use surrounding "if PPS" to remove numerous dependency checks 2017-09-08 18:26:51 -07:00
ps3
ptp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pwm pwm: rcar: Fix a condition to prevent mismatch value setting to duty 2018-04-24 09:36:34 +02:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()' 2017-12-14 09:53:08 +01:00
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regulator regulator: stm32-vrefbuf: fix check on ready flag 2018-03-15 10:54:28 +01:00
remoteproc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reset License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpmsg rpmsg: glink: Initialize the "intent_req_comp" completion variable 2017-12-20 10:10:29 +01:00
rtc rtc: opal: Fix OPAL RTC driver OPAL_BUSY loops 2018-05-01 12:58:24 -07:00
s390 scsi: zfcp: fix infinite iteration on ERP ready list 2018-05-25 16:17:34 +02:00
sbus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi scsi: aacraid: Insure command thread is not recursively stopped 2018-05-25 16:17:50 +02:00
sfi
sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sn
soc soc: mediatek: fix the mistaken pointer accessed when subdomains are added 2018-04-24 09:36:28 +02:00
spi spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL 2018-05-22 18:53:56 +02:00
spmi
ssb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
staging staging: lustre: lmv: correctly iput lmo_root 2018-05-25 16:17:44 +02:00
target scsi: target: Fix fortify_panic kernel exception 2018-05-09 09:51:51 +02:00
tc
tee tee: shm: fix use-after-free via temporarily dropped reference 2018-05-22 18:53:57 +02:00
thermal thermal: exynos: Propagate error value from tmu_read() 2018-05-16 10:10:30 +02:00
thunderbolt thunderbolt: Prevent crash when ICM firmware is not running 2018-04-24 09:36:29 +02:00
tty earlycon: Use a pointer table to fix __earlycon_table stride 2018-05-01 12:58:24 -07:00
uio uio_hv_generic: check that host supports monitor page 2018-04-12 12:32:19 +02:00
usb xhci: Show what USB release number the xHC supports from protocol capablity 2018-05-25 16:17:42 +02:00
uwb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio vfio/pci: Virtualize Maximum Read Request Size 2018-04-24 09:36:34 +02:00
vhost vhost: Fix vhost_copy_to_user() 2018-04-19 08:56:16 +02:00
video backlight: tdo24m: Fix the SPI CS between transfers 2018-04-12 12:32:16 +02:00
virt
virtio virtio_ring: fix num_free handling in error case 2018-03-15 10:54:32 +01:00
vlynq
vme License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
w1 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
watchdog watchdog: sp5100_tco: Fix watchdog disable bit 2018-04-26 11:02:08 +02:00
xen xen/grant-table: Use put_page instead of free_page 2018-04-26 11:02:17 +02:00
zorro License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2018-02-25 11:07:53 +01:00