On Sat, Dec 5, 2009 at 10:49 PM, Roland Dreier <[email protected]> wrote:
>
>  > I'm not sure that the non-error path for ordinary SCSI commands is
>  > that trivial. If my interpretation of the SRP initiator source code is
>  > correct, the statements complete(&target->done) and
>  > init_completion(&target->done) can be executed concurrently. Although
>  > I do not know what the exact consequences are, and although I do not
>  > know whether this is related to the issue I reported, this is a race
>  > condition. I'm not sure that allowing such races is good kernel
>  > programming practice.
>
> target->done is only used in connection setup I think, so not related to
> hangs during IO processing.  However I would like to know more details
> of where you see this race, since yes we would want to fix that.

What I wrote above was found via source reading, so I'm not sure yet
that concurrent calls of complete(&target->done) and
init_completion(&target->done) really happen. Is it possible that e.g.
one CPU calls complete(&target->done) as a result of processing the
IB_CM_TIMEWAIT_EXIT event while another CPU is calling
init_completion(&target->done) from inside srp_disconnect_target() ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to