Re: [PATCH v4 14/37] target: Use the command reference counting mechanism consistently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-02-09 at 01:51 -0800, Nicholas A. Bellinger wrote:
> This is wrong.  __transport_wait_for_tasks() logic that sets CMD_T_STOP
> clears CMD_T_ACTIVE after se_cmd->t_transport_stop_comp has completed.

I will drop that change.

> @@ -2532,7 +2530,7 @@ int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
> >  	if (aborted) {
> >  		pr_debug("Detected CMD_T_ABORTED for ITT: %llu\n", cmd->tag);
> >  		wait_for_completion(&cmd->cmd_wait_comp);
> > -		cmd->se_tfo->release_cmd(cmd);
> > +		transport_put_cmd(cmd);
> >  		ret = 1;
> >  	}
> >  	return ret;
> 
> This is broken.
> 
> The final kref_put of se_cmd->cmd_kref in transport_put_cmd() is what
> wakes up se_cmd->cmd_wait_comp, and allows forward process to continue.

Have you noticed that a later patch removes cmd_wait_comp? Anyway, I will
fold the removal of cmd_wait_comp into this patch.

Bart.--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux