kernel_samsung_a53x/drivers/scsi
Nilesh Javali 2f5efe87f5 scsi: qla2xxx: validate nvme_local_port correctly
commit eb1d4ce2609584eeb7694866f34d4b213caa3af9 upstream.

The driver load failed with error message,

qla2xxx [0000:04:00.0]-ffff:0: register_localport failed: ret=ffffffef

and with a kernel crash,

	BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
	Workqueue: events_unbound qla_register_fcport_fn [qla2xxx]
	RIP: 0010:nvme_fc_register_remoteport+0x16/0x430 [nvme_fc]
	RSP: 0018:ffffaaa040eb3d98 EFLAGS: 00010282
	RAX: 0000000000000000 RBX: ffff9dfb46b78c00 RCX: 0000000000000000
	RDX: ffff9dfb46b78da8 RSI: ffffaaa040eb3e08 RDI: 0000000000000000
	RBP: ffff9dfb612a0a58 R08: ffffffffaf1d6270 R09: 3a34303a30303030
	R10: 34303a303030305b R11: 2078787832616c71 R12: ffff9dfb46b78dd4
	R13: ffff9dfb46b78c24 R14: ffff9dfb41525300 R15: ffff9dfb46b78da8
	FS:  0000000000000000(0000) GS:ffff9dfc67c00000(0000) knlGS:0000000000000000
	CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
	CR2: 0000000000000070 CR3: 000000018da10004 CR4: 00000000000206f0
	Call Trace:
	qla_nvme_register_remote+0xeb/0x1f0 [qla2xxx]
	? qla2x00_dfs_create_rport+0x231/0x270 [qla2xxx]
	qla2x00_update_fcport+0x2a1/0x3c0 [qla2xxx]
	qla_register_fcport_fn+0x54/0xc0 [qla2xxx]

Exit the qla_nvme_register_remote() function when qla_nvme_register_hba()
fails and correctly validate nvme_local_port.

Cc: stable@vger.kernel.org
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20240710171057.35066-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:20:15 +01:00
..
aacraid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aic7xxx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aic94xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arcmsr scsi: arcmsr: Support new PCI device IDs 1883 and 1886 2024-11-18 12:13:12 +01:00
arm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
be2iscsi scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle() 2024-11-18 12:11:41 +01:00
bfa scsi: bfa: Ensure the copied buf is NUL terminated 2024-11-19 12:26:56 +01:00
bnx2fc scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload 2024-11-19 11:32:43 +01:00
bnx2i Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
csiostor scsi: csiostor: Avoid function pointer casts 2024-11-19 08:44:57 +01:00
cxgbi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cxlflash Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device_handler scsi: core: Introduce enum scsi_disposition 2024-11-18 12:13:21 +01:00
dpt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esas2r Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fcoe scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" 2024-11-18 12:13:29 +01:00
fnic scsi: fnic: Return error if vmalloc() failed 2024-11-18 12:12:31 +01:00
hisi_sas scsi: hisi_sas: Replace with standard error code return value 2024-11-18 12:12:36 +01:00
ibmvscsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibmvscsi_tgt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isci scsi: isci: Fix an error code problem in isci_io_request_build() 2024-11-18 12:13:21 +01:00
libfc scsi: libfc: Fix up timeout error in fc_fcp_rec_error() 2024-11-18 12:13:12 +01:00
libsas scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed 2024-11-19 14:19:50 +01:00
lpfc scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic 2024-11-19 11:32:43 +01:00
megaraid scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers 2024-11-18 11:43:21 +01:00
mpt3sas scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory 2024-11-19 14:19:02 +01:00
mvsas Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm8001 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qedf scsi: qedf: Set qed_slowpath_params to zero before use 2024-11-19 14:19:46 +01:00
qedi scsi: qedi: Fix crash while reading debugfs attribute 2024-11-19 14:19:06 +01:00
qla2xxx scsi: qla2xxx: validate nvme_local_port correctly 2024-11-23 23:20:15 +01:00
qla4xxx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smartpqi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
snic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sym53c8xx_2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ufs scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5 2024-11-19 12:27:19 +01:00
3w-9xxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-9xxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-sas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-sas.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-xxxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-xxxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.scr Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700_d.h_shipped Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a100u2w.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a100u2w.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a2091.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a2091.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3000.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3000.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a4000t.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
advansys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha152x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha152x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1542.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1542.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1740.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1740.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am53c974.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atari_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atp870u.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atp870u.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
BusLogic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
BusLogic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bvme6000_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
constants.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dc395x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dc395x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmx3191d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dpt_i2o.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dpti.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp_scsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain_isa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain_pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
FlashPoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
g_NCR5380.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_ioctl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_proc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gvp11.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gvp11.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hosts.c scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
hpsa.c scsi: hpsa: Fix allocation size for Scsi_Host private data 2024-11-19 12:26:55 +01:00
hpsa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpsa_cmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hptiop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hptiop.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
initio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
initio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ips.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ips.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_boot_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_tcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_tcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jazz_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig scsi: jazz_esp: Only build if SCSI core is builtin 2024-11-18 22:25:41 +01:00
lasi700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi_tcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac53c94.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac53c94.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
megaraid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
megaraid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme16x_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme147.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme147.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvumi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvumi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrb.c scsi: mylex: Fix sysfs buffer lengths 2024-11-19 09:23:10 +01:00
myrb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrs.c scsi: mylex: Fix sysfs buffer lengths 2024-11-19 09:23:10 +01:00
myrs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ncr53c8xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ncr53c8xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
NCR5380.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
NCR5380.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32_io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmcraid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmcraid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3rom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla1280.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla1280.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas408.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas408.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicpti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicpti.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid_class.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
script_asm.pl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_devinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_dh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_error.c scsi: core: Move scsi_host_busy() out of host lock if it is for per-command 2024-11-18 12:13:26 +01:00
scsi_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_lib.c scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
scsi_lib_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_logging.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_logging.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_priv.h scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
scsi_proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sas_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_scan.c scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
scsi_srpmb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_srpmb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sysctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sysfs.c scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
scsi_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_api.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_fc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_iscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_sas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_srp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsicam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd.c drivers: scsi: Reduce logspam 2024-11-19 17:47:00 +01:00
sd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_dif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_zbc.c scsi: sd: Fix wrong zone_write_granularity value during revalidate 2024-11-19 09:23:16 +01:00
sense_codes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ses.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sgiwd93.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sim710.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sni_53c710.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr_vendor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_options.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
storvsc_drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3_scsi_vme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3x_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmw_pvscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmw_pvscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd33c93.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd33c93.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd719x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd719x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-scsifront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zalon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zorro7xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zorro_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00