scsi: qla2xxx: Fix early srb free on abort
authorQuinn Tran <quinn.tran@cavium.com>
Tue, 11 Sep 2018 17:18:19 +0000 (10:18 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Sep 2018 00:28:10 +0000 (20:28 -0400)
commit8235f4b5aeba868739f6e12a51ad92689e3f78ef
tree8afeadb7ac30d14bdc21c8123894163fece37f89
parent0645cb8350cdb60bfbf91caa722984b81c215add
scsi: qla2xxx: Fix early srb free on abort

Task abort can take 2 paths: 1) serial/synchronous abort where the calling
thread will put to sleep, wait for completion and free cmd resource.  2) async
abort where the cmd free will be free by the completion thread.  For path 2,
driver is freeing the SRB too early.

Fixes: f6145e86d21f ("scsi: qla2xxx: Fix race between switch cmd completion and timeout")
Cc: stable@vger.kernel.org # 4.19
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c