qla2xxx: Remove decrement of sp reference count in abort handler.
authorChad Dupuis <chad.dupuis@qlogic.com>
Tue, 4 Aug 2015 17:38:00 +0000 (13:38 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 27 Aug 2015 00:47:45 +0000 (17:47 -0700)
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>
drivers/scsi/qla2xxx/qla_os.c

index f70809f..95bee68 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,