]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Remove decrement of sp reference count in abort handler.
authorChad Dupuis <chad.dupuis@qlogic.com>
Tue, 6 Oct 2015 09:16:11 +0000 (14:46 +0530)
committerDan Duval <dan.duval@oracle.com>
Thu, 15 Oct 2015 22:08:28 +0000 (18:08 -0400)
Orabug: 21946579

Fix for memory leak when command is not found by firmware due to
mismatch in sp reference count.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/scsi/qla2xxx/qla_os.c

index 87ea1acc3dd1c07d0b3f6ff830c0140a62f38f2d..97edc67b0d6889c976db73992a40a654de516117 100644 (file)
@@ -967,14 +967,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
        rval = ha->isp_ops->abort_command(sp);
        if (rval) {
-               if (rval == QLA_FUNCTION_PARAMETER_ERROR) {
-                       /*
-                        * Decrement the ref_count since we can't find the
-                        * command
-                        */
-                       atomic_dec(&sp->ref_count);
+               if (rval == QLA_FUNCTION_PARAMETER_ERROR)
                        ret = SUCCESS;
-               else
+               else
                        ret = FAILED;
 
                ql_dbg(ql_dbg_taskm, vha, 0x8003,