linux/drivers/scsi/libfc
Wenchao Hao 4df105f0ce scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
fc_lport_ptp_setup() did not check the return value of fc_rport_create()
which can return NULL and would cause a NULL pointer dereference. Address
this issue by checking return value of fc_rport_create() and log error
message on fc_rport_create() failed.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20231011130350.819571-1-haowenchao2@huawei.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-10-13 14:15:54 -04:00
..
fc_disc.c scsi: libfc: Include the correct header 2022-12-01 03:03:36 +00:00
fc_elsct.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_encode.h scsi: libfc: Replace one-element arrays with flexible-array members 2022-02-27 21:17:37 -05:00
fc_exch.c scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc() 2022-05-16 21:26:50 -04:00
fc_fcp.c scsi: fcoe: Use per-CPU API to update per-CPU statistics 2022-05-16 21:26:50 -04:00
fc_frame.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_libfc.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_libfc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_lport.c scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup() 2023-10-13 14:15:54 -04:00
fc_npiv.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_rport.c scsi: libfc: Fix array index out of bound exception 2021-06-28 22:31:16 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00