Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96219424 authored by Chad Dupuis's avatar Chad Dupuis Committed by James Bottomley
Browse files

qla2xxx: Remove decrement of sp reference count in abort handler.



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

Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 03aa868c
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -967,14 +967,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
	spin_unlock_irqrestore(&ha->hardware_lock, flags);
	spin_unlock_irqrestore(&ha->hardware_lock, flags);
	rval = ha->isp_ops->abort_command(sp);
	rval = ha->isp_ops->abort_command(sp);
	if (rval) {
	if (rval) {
		if (rval == QLA_FUNCTION_PARAMETER_ERROR) {
		if (rval == QLA_FUNCTION_PARAMETER_ERROR)
			/*
			 * Decrement the ref_count since we can't find the
			 * command
			 */
			atomic_dec(&sp->ref_count);
			ret = SUCCESS;
			ret = SUCCESS;
		} else
		else
			ret = FAILED;
			ret = FAILED;


		ql_dbg(ql_dbg_taskm, vha, 0x8003,
		ql_dbg(ql_dbg_taskm, vha, 0x8003,