Commit e7b53f1
committed
scsi: qla2xxx: Wait for io return on terminate rport
jira VULN-155086
cve CVE-2023-53322
commit-author Quinn Tran <qutran@marvell.com>
commit fc0cba0
System crash due to use after free.
Current code allows terminate_rport_io to exit before making
sure all IOs has returned. For FCP-2 device, IO's can hang
on in HW because driver has not tear down the session in FW at
first sign of cable pull. When dev_loss_tmo timer pops,
terminate_rport_io is called and upper layer is about to
free various resources. Terminate_rport_io trigger qla to do
the final cleanup, but the cleanup might not be fast enough where it
leave qla still holding on to the same resource.
Wait for IO's to return to upper layer before resources are freed.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230428075339.32551-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit fc0cba0)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 78e5c41 commit e7b53f1
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2639 | 2639 | | |
2640 | 2640 | | |
2641 | 2641 | | |
| 2642 | + | |
2642 | 2643 | | |
2643 | 2644 | | |
2644 | 2645 | | |
| |||
2648 | 2649 | | |
2649 | 2650 | | |
2650 | 2651 | | |
| 2652 | + | |
2651 | 2653 | | |
2652 | 2654 | | |
2653 | 2655 | | |
| 2656 | + | |
| 2657 | + | |
2654 | 2658 | | |
2655 | 2659 | | |
2656 | 2660 | | |
| |||
2672 | 2676 | | |
2673 | 2677 | | |
2674 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
2675 | 2688 | | |
2676 | 2689 | | |
2677 | 2690 | | |
| |||
0 commit comments