On Fri, 2011-07-15 at 22:10 +0800, Hillf Danton wrote:
> On Fri, Jul 15, 2011 at 7:13 AM, Vasu Dev <[email protected]> wrote:
> > On Thu, 2011-07-14 at 22:23 +0800, Hillf Danton wrote:
> >> On Wed, Jul 13, 2011 at 6:16 AM, Vasu Dev <[email protected]> wrote:
> >> > On Sun, 2011-07-10 at 15:23 +0800, Hillf Danton wrote:
> >> >> Since fsp->cmd is not set, it is unsafe to call fc_fcp_resp() directly.
> >> >>
> >> >> After calling, it is possible to release @seq twice.
> >> >>
> >> >
> >> > Can you elaborate how is that possible ? Shouldn't  doing  "fsp->seq_ptr
> >>
> >>
> >> Since fc_fcp_complete_locked() is called in fc_fcp_resp() and fsp->seq_ptr 
> >> is
> >> released in fc_fcp_complete_locked() if it is valid, if @seq == 
> >> fsp->seq_ptr,
> >> it is released here again.
> >>
> >
> > fc_fcp_complete_locked() sets  fsp->seq_ptr to NULL, so not possible to
> > get hold of seq_ptr after that, it does in this code.
> >
> >       if (seq) {
> >                fsp->seq_ptr = NULL;
> >                if (unlikely(fsp->scsi_comp_flags & FCP_CONF_REQ)) {
> >                ...
> 
> Would you please take the following code into consideration, with
> the above together?
> 
> -        fsp->seq_ptr = NULL;
> -        fsp->lp->tt.exch_done(seq);
> 

Hill, 

Not sure what is the new thing to consider here, very first your patch
justified its main change for "possible to release @seq twice". My
response to that was, it is not possible w/ current code as I said
before "doing  "fsp->seq_ptr = NULL"  under fcp pkt lock would ensure
that it is released only once w/o the patch".

So again current code would set seq_ptr to NULL under the fcp pkt lock
along with exch_done() calling and later any attempt to get hold of
seq_ptr will fail as we always do that always under fcp pkt lock  while
checking for non-NULL seq_ptr first and then only call exch_done() using
seq, thus not "possible to release @seq twice". May be I'm missing
something here, in that case explain me with detailed example of
"possible to release @seq twice".

Cheers,
Vasu


_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to