OpenCloudOS-Kernel/drivers/scsi/qedf
Jinhong Zhu f025312b08 scsi: qedf: Fix NULL dereference in error handling
Smatch reported:

drivers/scsi/qedf/qedf_main.c:3056 qedf_alloc_global_queues()
warn: missing unwind goto?

At this point in the function, nothing has been allocated so we can return
directly. In particular the "qedf->global_queues" have not been allocated
so calling qedf_free_global_queues() will lead to a NULL dereference when
we check if (!gl[i]) and "gl" is NULL.

Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Jinhong Zhu <jinhongzhu@hust.edu.cn>
Link: https://lore.kernel.org/r/20230502140022.2852-1-jinhongzhu@hust.edu.cn
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-05-08 07:19:20 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
drv_fcoe_fw_funcs.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
drv_fcoe_fw_funcs.h qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
drv_scsi_fw_funcs.c
drv_scsi_fw_funcs.h
qedf.h scsi: qedf: Stop using the SCSI pointer 2022-02-22 21:11:05 -05:00
qedf_attr.c scsi: qedf: Remove unnecessary code 2022-04-25 23:36:31 -04:00
qedf_dbg.c scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0) 2021-05-21 16:31:17 -04:00
qedf_dbg.h scsi: qedf: Remove unused include of linux/version.h 2021-04-05 23:45:23 -04:00
qedf_debugfs.c scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 16:01:58 -04:00
qedf_els.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedf_fip.c scsi: qedf: Remove redundant initialization of variable rc 2020-06-02 21:44:14 -04:00
qedf_hsi.h
qedf_io.c scsi: qedf: Fix typo in comment 2022-05-23 23:24:10 -04:00
qedf_main.c scsi: qedf: Fix NULL dereference in error handling 2023-05-08 07:19:20 -04:00
qedf_version.h scsi: qedf: Update the version to 8.42.3.0 2019-08-29 18:51:19 -04:00