]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: iscsi: Fix HW conn removal use after free
authorMike Christie <michael.christie@oracle.com>
Thu, 16 Jun 2022 22:27:33 +0000 (17:27 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Jun 2022 01:14:53 +0000 (21:14 -0400)
commit64f2f6e030cd591c28e0a0cebb972dd5b6233ee7
tree237689dc1ba5552e34b75e8916db37e04c56da78
parent4932813262473e8a76c9fda3c3ff50a7c1e434c4
scsi: iscsi: Fix HW conn removal use after free

If qla4xxx doesn't remove the connection before the session, the iSCSI
class tries to remove the connection for it. We were doing a
iscsi_put_conn() in the iter function which is not needed and will result
in a use after free because iscsi_remove_conn() will free the connection.

Link: https://lore.kernel.org/r/20220616222738.5722-2-michael.christie@oracle.com
Tested-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_iscsi.c