Commit 258aad7
scsi: iscsi: Fix iscsi_task use after free
Commit d39df15 ("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/[email protected]
Fixes: d39df15 ("scsi: iscsi: Have abort handler get ref to conn")
Signed-off-by: Mike Christie <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 69a3a7b commit 258aad7
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2281 | 2281 | | |
2282 | 2282 | | |
2283 | 2283 | | |
2284 | | - | |
2285 | | - | |
2286 | | - | |
2287 | | - | |
2288 | | - | |
2289 | 2284 | | |
2290 | 2285 | | |
2291 | 2286 | | |
2292 | 2287 | | |
2293 | 2288 | | |
2294 | 2289 | | |
2295 | 2290 | | |
2296 | | - | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
2297 | 2294 | | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
2298 | 2301 | | |
2299 | 2302 | | |
2300 | 2303 | | |
| |||
0 commit comments