Commit 05ee376
scsi: qla2xxx: Pointer may be dereferenced
commit 00eca15 upstream.
Klocwork tool reported pointer 'rport' returned from call to function
fc_bsg_to_rport() may be NULL and will be dereferenced.
Add a fix to validate rport before dereferencing.
Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-7-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>1 parent 23efa9f commit 05ee376
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2903 | 2903 | | |
2904 | 2904 | | |
2905 | 2905 | | |
| 2906 | + | |
| 2907 | + | |
2906 | 2908 | | |
2907 | 2909 | | |
2908 | 2910 | | |
| |||
0 commit comments