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 18:58 +0000, Bart Van Assche wrote:
> 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.

This patch breaks everything as-is.  If the end result it's not the
case, then the ordering of this series is totally wrong.

--
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