TencentOS-kernel/drivers
James Smart 61418a22ef scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce
[ Upstream commit 6c1e803eac846f886cd35131e6516fc51a8414b9 ]

When reading sysfs nvme_info file while a remote port leaves and comes
back, a NULL pointer is encountered. The issue is due to ndlp list
corruption as the the nvme_info_show does not use the same lock as the rest
of the code.

Correct by removing the rcu_xxx_lock calls and replace by the host_lock and
phba->hbaLock spinlocks that are used by the rest of the driver.  Given
we're called from sysfs, we are safe to use _irq rather than _irqsave.

Link: https://lore.kernel.org/r/20191105005708.7399-4-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:36:35 +08:00
..
accessibility Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
acpi ACPICA: Do not increment operation_region reference counts for field units 2021-03-16 16:33:26 +08:00
amba Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
android binder: Prevent context manager from incrementing ref 0 2021-03-16 16:33:03 +08:00
ata libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks 2021-03-16 16:35:42 +08:00
atm firestream: Fix memleak in fs_open 2021-03-16 16:35:54 +08:00
auxdisplay Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
base firmware_loader: fix memory leak for paged buffer 2021-03-16 16:36:11 +08:00
bcma Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2021-03-16 16:36:06 +08:00
bluetooth Bluetooth: hci_serdev: Only unregister device if it was registered 2021-03-16 16:33:41 +08:00
bus bus: ti-sysc: Add missing quirk flags for usb_host_hs 2021-03-16 16:33:21 +08:00
cdrom Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
char tpm: Unify the mismatching TPM space buffer sizes 2021-03-16 16:33:55 +08:00
clk clk: rockchip: Fix initialization of mux_pll_src_4plls_p 2021-03-16 16:36:15 +08:00
clocksource arm64: arch_timer: Disable the compat vdso for cores affected by ARM64_WORKAROUND_1418040 2021-03-16 16:31:46 +08:00
connector Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
counter counter: 104-quad-8: Add lock guards - generic interface 2021-03-16 16:27:07 +08:00
cpufreq cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled 2021-03-16 16:35:59 +08:00
cpuidle cpuidle: Fixup IRQ state 2021-03-16 16:35:25 +08:00
crypto crypto: caam - Remove broken arc4 support 2021-03-16 16:34:14 +08:00
dax dm: Call proper helper to determine dax support 2021-03-16 16:36:23 +08:00
dca Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2021-03-16 16:36:35 +08:00
dio Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dma drivers/dma/dma-jz4780: Fix race condition between probe and irq handler 2021-03-16 16:35:55 +08:00
dma-buf dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) 2021-03-16 16:36:32 +08:00
edac EDAC/{i7core,sb,pnd2,skx}: Fix error event severity 2021-03-16 16:34:59 +08:00
eisa Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2021-03-16 16:30:26 +08:00
firewire Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
firmware efi: add missed destroy_workqueue when efisubsys_init fails 2021-03-16 16:34:41 +08:00
fpga fpga: dfl: fix bug in port reset handshake 2021-03-16 16:32:23 +08:00
fsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gnss gnss: sirf: fix error return code in sirf_probe() 2021-03-16 16:29:47 +08:00
gpio gpio: arizona: put pm_runtime in case of failure 2021-03-16 16:32:18 +08:00
gpu drm/amd/display: Free gamma after calculating legacy transfer function 2021-03-16 16:36:34 +08:00
greybus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hid HID: elan: Fix memleak in elan_input_configured 2021-03-16 16:35:58 +08:00
hsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hv Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload 2021-03-16 16:36:17 +08:00
hwmon hwmon: (applesmc) check status earlier. 2021-03-16 16:35:24 +08:00
hwspinlock Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hwtracing coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb() 2021-03-16 16:33:38 +08:00
i2c i2c: i801: Fix resume bug 2021-03-16 16:36:20 +08:00
i3c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ide Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
idle Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iio iio:accel:mma8452: Fix timestamp alignment and prevent data leak. 2021-03-16 16:36:03 +08:00
infiniband RDMA/bnxt_re: Restrict the max_gids to 256 2021-03-16 16:36:10 +08:00
input Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists 2021-03-16 16:36:21 +08:00
interconnect Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iommu iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE 2021-03-16 16:36:31 +08:00
ipack ipack: tpci200: fix error return code in tpci200_register() 2021-03-16 16:28:19 +08:00
irqchip irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake 2021-03-16 16:35:14 +08:00
isdn Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
leds leds: mlxreg: Fix possible buffer overflow 2021-03-16 16:36:35 +08:00
lightnvm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
macintosh macintosh/via-macii: Access autopoll_devs when inside lock 2021-03-16 16:33:39 +08:00
mailbox mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe() 2021-03-16 16:30:27 +08:00
mcb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
md dm table: do not allow request-based DM to stack on partitions 2021-03-16 16:36:35 +08:00
media media: smiapp: Fix error handling at NVM reading 2021-03-16 16:36:34 +08:00
memory Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
memstick Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
message scsi: mptscsih: Fix read sense data size 2021-03-16 16:31:28 +08:00
mfd mfd: intel-lpss: Add Intel Tiger Lake PCH-H PCI IDs 2021-03-16 16:34:47 +08:00
misc habanalabs: check correct vmalloc return code 2021-03-16 16:35:25 +08:00
mmc mmc: sdhci-of-esdhc: Don't walk device-tree on every interrupt 2021-03-16 16:36:06 +08:00
mtd mtd: rawnand: fsl_upm: Remove unused mtd var 2021-03-16 16:34:11 +08:00
mux Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net ath10k: fix memory leak for tpc_stats_final 2021-03-16 16:36:32 +08:00
nfc NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2021-03-16 16:35:54 +08:00
ntb NTB: perf: Fix race condition when run with ntb_test 2021-03-16 16:30:32 +08:00
nubus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nvdimm libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr 2021-03-16 16:34:18 +08:00
nvme nvme-tcp: cancel async events before freeing event struct 2021-03-16 16:36:14 +08:00
nvmem nvmem: qfprom: remove incorrect write support 2021-03-16 16:28:52 +08:00
of of: of_mdio: Correct loop scanning logic 2021-03-16 16:31:51 +08:00
opp opp: Enable resources again if they were disabled earlier 2021-03-16 16:34:30 +08:00
oprofile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
parisc parisc: mask out enable and reserved bits from sba imask 2021-03-16 16:33:54 +08:00
parport Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pci PCI/IOV: Serialize sysfs sriov_numvfs reads vs writes 2021-03-16 16:36:33 +08:00
pcmcia Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
perf drivers/perf: Prevent forced unbinding of PMU drivers 2021-03-16 16:32:34 +08:00
phy phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init 2021-03-16 16:36:08 +08:00
pinctrl pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ 2021-03-16 16:34:11 +08:00
platform platform/chrome: cros_ec_ishtp: Fix a double-unlock issue 2021-03-16 16:34:12 +08:00
pnp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
power power: supply: check if calc_soc succeeded in pm860x_init_battery 2021-03-16 16:33:40 +08:00
powercap Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pps Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ps3 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ptp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pwm pwm: bcm-iproc: handle clk_get_rate() return 2021-03-16 16:34:17 +08:00
rapidio rapidio: Replace 'select' DMAENGINES 'with depends on' 2021-03-16 16:36:13 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
regulator regulator: pwm: Fix machine constraints application 2021-03-16 16:36:12 +08:00
remoteproc remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load 2021-03-16 16:34:10 +08:00
reset Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rpmsg Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rtc rtc: goldfish: Enable interrupt in set_alarm() when necessary 2021-03-16 16:34:31 +08:00
s390 s390/zcrypt: fix kmalloc 256k failure 2021-03-16 16:36:22 +08:00
sbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
scsi scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce 2021-03-16 16:36:35 +08:00
sfi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sh Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
siox Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
slimbus slimbus: core: Fix mismatch in of_node_get/put 2021-03-16 16:32:05 +08:00
soc soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag 2021-03-16 16:33:19 +08:00
soundwire soundwire: intel/cadence: fix startup sequence 2021-03-16 16:36:34 +08:00
spi spi: Fix memory leak on splited transfers 2021-03-16 16:36:15 +08:00
spmi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ssb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
staging staging: greybus: audio: fix uninitialized value issue 2021-03-16 16:36:08 +08:00
target scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem 2021-03-16 16:36:05 +08:00
tc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tee Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
thermal thermal: qcom-spmi-temp-alarm: Don't suppress negative temp 2021-03-16 16:35:35 +08:00
thunderbolt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tty serial: 8250_pci: Add Realtek 816a and 816b 2021-03-16 16:36:21 +08:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2021-03-16 16:32:12 +08:00
usb ehci-hcd: Move include to keep CRC stable 2021-03-16 16:36:22 +08:00
vfio vfio/pci: Fix SR-IOV VF handling with MMIO blocking 2021-03-16 16:35:44 +08:00
vhost vhost/scsi: fix up req type endian-ness 2021-03-16 16:32:46 +08:00
video fbcon: Fix user font detection test at fbcon_resize(). 2021-03-16 16:36:18 +08:00
virt virt: vbox: Fix guest capabilities mask check 2021-03-16 16:32:09 +08:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2021-03-16 16:34:34 +08:00
visorbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vlynq Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vme Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2021-03-16 16:29:53 +08:00
watchdog watchdog: initialize device before misc_register 2021-03-16 16:34:19 +08:00
xen xen/xenbus: Fix granting of vmalloc'd memory 2021-03-16 16:35:26 +08:00
zorro Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00