diff options
author | Chad Dupuis <cdupuis@marvell.com> | 2020-04-16 11:43:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-04-18 00:55:29 +0300 |
commit | ad40f5256095c68dc17c991eb976261d5ea2daaa (patch) | |
tree | bab4d6390ed0992f61d5e749eccdb31a47620c6d /drivers/xen | |
parent | f6b172f21999cf5a18a49d6c028ba46b1c9ce02f (diff) | |
download | linux-ad40f5256095c68dc17c991eb976261d5ea2daaa.tar.xz |
scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing
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>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions