Roman Bolshakov
09f401b656
scsi: qla2xxx: Initialize free_work before flushing it
...
commit 4c86b037a6db3ad2922ef3ba8a8989eb7794e040 upstream.
Target creation triggers a new BUG_ON introduced in in commit 4d43d395fe
("workqueue: Try to catch flush_work() without INIT_WORK()."). The BUG_ON
reveals an attempt to flush free_work in qla24xx_do_nack_work before it's
initialized in qlt_unreg_sess:
WARNING: CPU: 7 PID: 211 at kernel/workqueue.c:3031 __flush_work.isra.38+0x40/0x2e0
CPU: 7 PID: 211 Comm: kworker/7:1 Kdump: loaded Tainted: G E 5.3.0-rc7-vanilla+ #2
Workqueue: qla2xxx_wq qla2x00_iocb_work_fn [qla2xxx]
NIP: c000000000159620 LR: c0080000009d91b0 CTR: c0000000001598c0
REGS: c000000005f3f730 TRAP: 0700 Tainted: G E (5.3.0-rc7-vanilla+)
MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 24002222 XER: 00000000
CFAR: c0000000001598d0 IRQMASK: 0
GPR00: c0080000009d91b0 c000000005f3f9c0 c000000001670a00 c0000003f8655ca8
GPR04: c0000003f8655c00 000000000000ffff 0000000000000011 ffffffffffffffff
GPR08: c008000000949228 0000000000000000 0000000000000001 c0080000009e7780
GPR12: 0000000000002200 c00000003fff6200 c000000000161bc8 0000000000000004
GPR16: c0000003f9d68280 0000000002000000 0000000000000005 0000000000000003
GPR20: 0000000000000002 000000000000ffff 0000000000000000 fffffffffffffef7
GPR24: c000000004f73848 c000000004f73838 c000000004f73f28 c000000005f3fb60
GPR28: c000000004f73e48 c000000004f73c80 c000000004f73818 c0000003f9d68280
NIP [c000000000159620] __flush_work.isra.38+0x40/0x2e0
LR [c0080000009d91b0] qla24xx_do_nack_work+0x88/0x180 [qla2xxx]
Call Trace:
[c000000005f3f9c0] [c000000000159644] __flush_work.isra.38+0x64/0x2e0 (unreliable)
[c000000005f3fa50] [c0080000009d91a0] qla24xx_do_nack_work+0x78/0x180 [qla2xxx]
[c000000005f3fae0] [c0080000009496ec] qla2x00_do_work+0x604/0xb90 [qla2xxx]
[c000000005f3fc40] [c008000000949cd8] qla2x00_iocb_work_fn+0x60/0xe0 [qla2xxx]
[c000000005f3fc80] [c000000000157bb8] process_one_work+0x2c8/0x5b0
[c000000005f3fd10] [c000000000157f28] worker_thread+0x88/0x660
[c000000005f3fdb0] [c000000000161d64] kthread+0x1a4/0x1b0
[c000000005f3fe20] [c00000000000b960] ret_from_kernel_thread+0x5c/0x7c
Instruction dump:
3d22001d 892966b1 7d908026 91810008 f821ff71 69290001 0b090000 2e290000
40920200 e9230018 7d2a0074 794ad182 <0b0a0000> 2fa90000 419e01e8 7c0802a6
---[ end trace 5ccf335d4f90fcb8 ]---
Fixes: 1021f0bc2f ("scsi: qla2xxx: allow session delete to finish before create.")
Cc: Quinn Tran <qutran@marvell.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191125165702.1013-4-r.bolshakov@yadro.com
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-21 11:05:07 +01:00
arch
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
2019-12-21 11:04:48 +01:00
block
block: fix "check bi_size overflow before merge"
2019-12-21 11:04:32 +01:00
certs
PKCS#7: Refactor verify_pkcs7_signature()
2019-08-05 18:40:18 -04:00
crypto
crypto: user - fix memory leak in crypto_reportstat
2019-12-13 08:43:11 +01:00
Documentation
USB: documentation: flags on usb-storage versus UAS
2019-12-17 19:55:32 +01:00
drivers
scsi: qla2xxx: Initialize free_work before flushing it
2019-12-21 11:05:07 +01:00
fs
cifs: Fix retrieval of DFS referrals in cifs_mount()
2019-12-21 11:04:46 +01:00
include
PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX
2019-12-21 11:04:31 +01:00
init
Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2019-09-28 08:14:15 -07:00
ipc
ipc/sem.c: convert to use built-in RCU list checking
2019-09-25 17:51:41 -07:00
kernel
workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
2019-12-17 19:56:54 +01:00
lib
lib: raid6: fix awk build warnings
2019-12-17 19:56:09 +01:00
LICENSES
mm
mm/shmem.c: cast the type of unmap_start to u64
2019-12-17 19:56:51 +01:00
net
xdp: obtain the mem_id mutex before trying to remove an entry.
2019-12-18 16:09:10 +01:00
samples
samples/bpf: fix build by setting HAVE_ATTR_TEST to zero
2019-10-31 21:39:15 +01:00
scripts
arm64 fix for -rc8 / final
2019-11-15 09:14:23 -08:00
security
efi/efi_test: Lock down /dev/efi_test and require CAP_SYS_ADMIN
2019-10-31 09:40:21 +01:00
sound
ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO
2019-12-17 19:56:28 +01:00
tools
net/tls: Fix return values to avoid ENOTSUPP
2019-12-18 16:08:31 +01:00
usr
kbuild: update compile-test header list for v5.4-rc2
2019-10-05 15:29:49 +09:00
virt
KVM: arm/arm64: vgic: Don't rely on the wrong pending table
2019-12-13 08:43:00 +01:00
.clang-format
clang-format: Update with the latest for_each macro list
2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
Modules updates for v5.4
2019-09-22 10:34:46 -07:00
.mailmap
ARM: SoC fixes
2019-11-10 13:41:59 -08:00
COPYING
CREDITS
MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer
2019-10-10 08:12:51 -07:00
Kbuild
kbuild: do not descend to ./Kbuild when cleaning
2019-08-21 21:03:58 +09:00
Kconfig
docs: kbuild: convert docs to ReST and rename to *.rst
2019-06-14 14:21:21 -06:00
MAINTAINERS
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
2019-11-22 14:28:14 -08:00
Makefile
Linux 5.4.5
2019-12-18 16:09:17 +01:00
README