Skip to contentSkip to conversation

mpt2sas: running out of message frames

PATCH New Eric Moore 1 participant 1 message Apr 9, 2009 SCSI

lore
Share & tools
lore

Eric Moore

author
#0 lore raw

PATCH 4/4 mpt2sas: running out of message frames

The driver is not freeing message frame when returning failure from
_ctl_do_task_abort. If you call this function 500 times when its unable
to find an active task mid, you end up with no message frames.

drivers/scsi/mpt2sas/mpt2sas_ctl.c +3 -1
diff -uaprN a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c
@@ -714,8 +714,10 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPT
 
 		if (tm_request->TaskType ==
 		    MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
-			if (_ctl_do_task_abort(ioc, &karg, tm_request))
+			if (_ctl_do_task_abort(ioc, &karg, tm_request)) {
+				mpt2sas_base_free_smid(ioc, smid);
 				goto out;
+			}
 		}
 
 		mutex_lock(&ioc->tm_cmds.mutex);