linux/drivers/scsi/qedf
Chad Dupuis af59f7fdfa scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing
[ Upstream commit ad40f52560 ]

The MFW may make a call to qed and then to qedf for protocol statistics
while the function is still probing.  If this happens it's possible that
some members of the struct qedf_ctx may not be fully initialized which can
result in a NULL pointer dereference or general protection fault.

To prevent this, add a new flag call QEDF_PROBING and set it when the
__qedf_probe() function is active. Then in the qedf_get_protocol_tlv_data()
function we can check if the function is still probing and return
immediantely before any uninitialized structures can be touched.

Link: https://lore.kernel.org/r/20200416084314.18851-9-skashyap@marvell.com
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-25 15:32:53 +02:00
..
drv_fcoe_fw_funcs.c
drv_fcoe_fw_funcs.h
drv_scsi_fw_funcs.c
drv_scsi_fw_funcs.h
Kconfig
Makefile
qedf_attr.c
qedf_dbg.c
qedf_dbg.h
qedf_debugfs.c
qedf_els.c scsi: qedf: Do not retry ELS request if qedf_alloc_cmd fails 2020-01-09 10:19:07 +01:00
qedf_fip.c
qedf_hsi.h
qedf_io.c
qedf_main.c scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing 2020-06-25 15:32:53 +02:00
qedf_version.h
qedf.h scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing 2020-06-25 15:32:53 +02:00