]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: qla2xxx: Pointer may be dereferenced
authorShreyas Deodhar <sdeodhar@marvell.com>
Wed, 7 Jun 2023 11:38:41 +0000 (17:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:49 +0000 (13:49 +0200)
commitb06d1b525364bbcf4929b4b35d81945b10dc9883
tree06422d1375575e685916ea159e9c8266e969baa5
parentb88b1241fb1cb8174a474f7f5bbf030433722e04
scsi: qla2xxx: Pointer may be dereferenced

commit 00eca15319d9ce8c31cdf22f32a3467775423df4 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>
drivers/scsi/qla2xxx/qla_bsg.c