linux/drivers
Ewan D. Milne 9977d880f7 scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash
The phba->poll_list is traversed in case of an error in
lpfc_sli4_hba_setup(), so it must be initialized earlier in case the error
path is taken.

[  490.030738] lpfc 0000:65:00.0: 0:1413 Failed to init iocb list.
[  490.036661] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[  490.044485] PGD 0 P4D 0
[  490.047027] Oops: 0000 [#1] SMP PTI
[  490.050518] CPU: 0 PID: 7 Comm: kworker/0:1 Kdump: loaded Tainted: G          I      --------- -  - 4.18.
[  490.060511] Hardware name: Dell Inc. PowerEdge R440/0WKGTH, BIOS 1.4.8 05/22/2018
[  490.067994] Workqueue: events work_for_cpu_fn
[  490.072371] RIP: 0010:lpfc_sli4_cleanup_poll_list+0x20/0xb0 [lpfc]
[  490.078546] Code: cf e9 04 f7 fe ff 0f 1f 40 00 0f 1f 44 00 00 41 57 49 89 ff 41 56 41 55 41 54 4d 8d a79
[  490.097291] RSP: 0018:ffffbd1a463dbcc8 EFLAGS: 00010246
[  490.102518] RAX: 0000000000008200 RBX: ffff945cdb8c0000 RCX: 0000000000000000
[  490.109649] RDX: 0000000000018200 RSI: ffff9468d0e16818 RDI: 0000000000000000
[  490.116783] RBP: ffff945cdb8c1740 R08: 00000000000015c5 R09: 0000000000000042
[  490.123915] R10: 0000000000000000 R11: ffffbd1a463dbab0 R12: ffff945cdb8c25c0
[  490.131049] R13: 00000000fffffff4 R14: 0000000000001800 R15: ffff945cdb8c0000
[  490.138182] FS:  0000000000000000(0000) GS:ffff9468d0e00000(0000) knlGS:0000000000000000
[  490.146267] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  490.152013] CR2: 0000000000000000 CR3: 000000042ca10002 CR4: 00000000007706f0
[  490.159146] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  490.166277] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  490.173409] PKRU: 55555554
[  490.176123] Call Trace:
[  490.178598]  lpfc_sli4_queue_destroy+0x7f/0x3c0 [lpfc]
[  490.183745]  lpfc_sli4_hba_setup+0x1bc7/0x23e0 [lpfc]
[  490.188797]  ? kernfs_activate+0x63/0x80
[  490.192721]  ? kernfs_add_one+0xe7/0x130
[  490.196647]  ? __kernfs_create_file+0x80/0xb0
[  490.201020]  ? lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc]
[  490.206944]  lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc]
[  490.212697]  lpfc_pci_probe_one+0x179/0xb70 [lpfc]
[  490.217492]  local_pci_probe+0x41/0x90
[  490.221246]  work_for_cpu_fn+0x16/0x20
[  490.224994]  process_one_work+0x1a7/0x360
[  490.229009]  ? create_worker+0x1a0/0x1a0
[  490.232933]  worker_thread+0x1cf/0x390
[  490.236687]  ? create_worker+0x1a0/0x1a0
[  490.240612]  kthread+0x116/0x130
[  490.243846]  ? kthread_flush_work_fn+0x10/0x10
[  490.248293]  ret_from_fork+0x35/0x40
[  490.251869] Modules linked in: lpfc(+) xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4i
[  490.332609] CR2: 0000000000000000

Link: https://lore.kernel.org/r/20210809150947.18104-1-emilne@redhat.com
Fixes: 93a4d6f401 ("scsi: lpfc: Add registration for CPU Offline/Online events")
Cc: stable@vger.kernel.org
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-08-09 22:45:51 -04:00
..
accessibility TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
acpi More ACPI updates for 5.14-rc1 2021-07-07 13:30:01 -07:00
amba
android
ata ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
atm Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
auxdisplay
base More power management updates for 5.14-rc1 2021-07-07 13:22:59 -07:00
bcma
block block-5.14-2021-07-08 2021-07-09 12:05:33 -07:00
bluetooth TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
bus ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
cdrom block: remove REQ_OP_SCSI_{IN,OUT} 2021-06-30 15:34:19 -06:00
char ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
clk The second batch of clk driver code for -rc1 2021-07-08 12:12:22 -07:00
clocksource This round has a diffstat dominated by Qualcomm clk drivers. Honestly though 2021-07-01 13:26:16 -07:00
comedi Staging / IIO driver patches for 5.14-rc1 2021-07-05 14:01:53 -07:00
connector
counter
cpufreq Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2021-07-01 14:25:43 +02:00
cpuidle - Add support for the Qcom MSM8226 (Bartosz Dudziak) 2021-06-30 14:56:51 +02:00
crypto ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
cxl
dax fs: remove noop_set_page_dirty() 2021-06-29 10:53:48 -07:00
dca
devfreq
dio
dma Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
dma-buf
edac Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
eisa
extcon Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
firewire Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
firmware ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
fpga
fsi
gnss
gpio - Core Frameworks 2021-07-05 12:10:34 -07:00
gpu drm fixes for 5.14-rc1 2021-07-08 12:28:15 -07:00
greybus
hid Merge branch 'for-5.14/multitouch' into for-linus 2021-06-30 09:15:15 +02:00
hsi
hv Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
hwmon Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
hwspinlock
hwtracing Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
i2c Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2021-07-04 11:47:18 -07:00
i3c I3C for 5.14 2021-07-10 11:53:06 -07:00
idle
iio Staging / IIO driver patches for 5.14-rc1 2021-07-05 14:01:53 -07:00
infiniband Tracing updates for 5.14: 2021-07-03 11:13:22 -07:00
input This pull request contains the following changes for UML: 2021-07-09 10:19:13 -07:00
interconnect
iommu ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
ipack TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
irqchip irqchip fixes for 5.14, take #1 2021-07-09 15:35:13 +02:00
isdn TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
leds This contains quite a lot of fixes, with more fixes in my inbox that 2021-07-03 11:57:42 -07:00
lightnvm
macintosh
mailbox mbox: add polarfire soc system controller mailbox 2021-06-26 12:06:48 -05:00
mcb
md - Various DM persistent-data library improvements and fixes that 2021-06-30 18:19:39 -07:00
media Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
memory
memstick for-5.14/block-2021-06-29 2021-06-30 12:12:56 -07:00
message
mfd Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
misc TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
mmc block-5.14-2021-07-08 2021-07-09 12:05:33 -07:00
most
mtd This pull request contains the following changes for UBIFS: 2021-07-09 10:10:47 -07:00
mux
net ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
nfc
ntb
nubus
nvdimm cxl for 5.14 2021-07-04 11:55:13 -07:00
nvme block-5.14-2021-07-08 2021-07-09 12:05:33 -07:00
nvmem Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
of Devicetree updates for v5.14: 2021-07-03 10:54:08 -07:00
opp
parisc kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
parport
pci pci-v5.14-fixes-1 2021-07-10 11:57:57 -07:00
pcmcia
perf
phy USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
pinctrl This is the bulk of pin control changes for the v5.14 kernel: 2021-07-01 16:57:14 -07:00
platform Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
pnp Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
power power supply and reset changes for the v5.14 series 2021-07-07 13:17:48 -07:00
powercap
pps
ps3
ptp ptp: Set lookup cookie when creating a PTP PPS source. 2021-06-29 11:29:37 -07:00
pwm pwm: Remove redundant assignment to pointer pwm 2021-07-07 21:43:32 +02:00
rapidio
ras
regulator - Core Frameworks 2021-07-05 12:10:34 -07:00
remoteproc remoteproc updates for v5.14 2021-07-07 10:50:03 -07:00
reset ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
rpmsg
rtc RTC for 5.14 2021-07-10 16:19:10 -07:00
s390 scsi: zfcp: Report port fc_security as unknown early during remote cable pull 2021-07-12 21:51:50 -04:00
sbus
scsi scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash 2021-08-09 22:45:51 -04:00
sh
siox
slimbus
soc ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
soundwire Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
spi Merge remote-tracking branch 'spi/for-5.14' into spi-next 2021-06-25 14:08:26 +01:00
spmi spmi: hisi-spmi-controller: move driver from staging 2021-06-25 10:02:05 +02:00
ssb
staging TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
target scsi: target: Fix NULL dereference on XCOPY completion 2021-07-20 23:18:22 -04:00
tc
tee fallthrough fixes for Clang for 5.14-rc1 2021-06-28 20:03:38 -07:00
thermal - Add rk3568 sensor support (Finley Xiao) 2021-07-10 11:43:25 -07:00
thunderbolt USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
tty This pull request contains the following changes for UML: 2021-07-09 10:19:13 -07:00
uio
usb USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
vdpa vp_vdpa: allow set vq state to initial state after reset 2021-07-08 07:49:02 -04:00
vfio VFIO update for v5.14-rc1 2021-07-03 11:49:33 -07:00
vhost vdpa: support packed virtqueue for set/get_vq_state() 2021-07-08 07:49:01 -04:00
video This pull request contains the following changes for UML: 2021-07-09 10:19:13 -07:00
virt
virtio virtio,vhost,vdpa: features, fixes 2021-07-09 11:06:29 -07:00
visorbus
vlynq
vme
w1
watchdog linux-watchdog 5.14-rc1 tag 2021-07-07 12:57:46 -07:00
xen xen: branch for v5.14-rc1 2021-07-07 11:07:13 -07:00
zorro
Kconfig
Makefile hyperv-next for 5.14 2021-06-29 11:21:35 -07:00