From: Chad Dupuis Date: Tue, 6 Oct 2015 09:16:11 +0000 (+0530) Subject: qla2xxx: Remove decrement of sp reference count in abort handler. X-Git-Tag: v4.1.12-92~259^2~3^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bb3ebb75403c86e025c21e408e4556d4124f3953;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Remove decrement of sp reference count in abort handler. 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 Signed-off-by: Himanshu Madhani Signed-off-by: James Bottomley Signed-off-by: Dan Duval --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 87ea1acc3dd1c..97edc67b0d688 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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,