Mike Christie 258aad75c6 scsi: iscsi: Fix iscsi_task use after free
Commit d39df158518c ("scsi: iscsi: Have abort handler get ref to conn")
added iscsi_get_conn()/iscsi_put_conn() calls during abort handling but
then also changed the handling of the case where we detect an already
completed task where we now end up doing a goto to the common put/cleanup
code. This results in a iscsi_task use after free, because the common
cleanup code will do a put on the iscsi_task.

This reverts the goto and moves the iscsi_get_conn() to after we've checked
if the iscsi_task is valid.

Link: https://lore.kernel.org/r/20211004210608.9962-1-michael.christie@oracle.com
Fixes: d39df158518c ("scsi: iscsi: Have abort handler get ref to conn")
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-04 23:40:11 -04:00
..
2021-07-11 10:59:53 -07:00
2021-07-11 10:59:53 -07:00
2021-05-21 17:01:18 -04:00
2021-07-11 10:59:53 -07:00
2021-09-07 19:13:42 -07:00
2020-03-11 23:07:59 -04:00
2021-01-22 21:14:08 -05:00
2021-01-22 21:14:07 -05:00
2021-01-22 21:14:08 -05:00
2021-05-31 22:48:22 -04:00
2020-03-11 23:07:59 -04:00
2021-05-31 22:48:21 -04:00
2020-09-02 22:49:06 -04:00
2021-05-31 22:48:21 -04:00
2021-04-13 00:20:48 -04:00
2020-12-07 20:24:09 -05:00
2020-12-07 20:24:09 -05:00
2021-05-31 22:48:23 -04:00
2021-05-21 16:59:33 -04:00
2021-09-02 15:09:46 -07:00
2021-03-24 23:03:43 -04:00
2021-08-17 22:28:39 -04:00
2021-09-02 15:09:46 -07:00
2020-10-14 15:15:35 -07:00
2021-09-02 15:09:46 -07:00
2021-09-02 15:09:46 -07:00
2020-02-24 15:01:57 -05:00
2021-08-23 12:54:30 -06:00
2021-09-02 15:09:46 -07:00
2021-04-13 00:20:48 -04:00
2021-07-02 15:14:36 -07:00
2021-08-16 13:33:24 -04:00