Skip to content

Commit

Permalink
IB/srp: Fix a connection setup race
Browse files Browse the repository at this point in the history
Avoid that receiving a DREQ while RDMA channels are being
established causes target->qp_in_error to be reset.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Cc: <stable@vger.kernel.org> #v3.19
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Bart Van Assche authored and Doug Ledford committed May 18, 2015
1 parent fb49c8b commit 8de9fe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,6 @@ static int srp_connect_ch(struct srp_rdma_ch *ch, bool multich)

WARN_ON_ONCE(!multich && target->connected);

target->qp_in_error = false;

ret = srp_lookup_path(ch);
if (ret)
return ret;
Expand Down Expand Up @@ -1243,6 +1241,9 @@ static int srp_rport_reconnect(struct srp_rport *rport)
for (j = 0; j < target->queue_size; ++j)
list_add(&ch->tx_ring[j]->list, &ch->free_tx);
}

target->qp_in_error = false;

for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i];
if (ret || !ch->target) {
Expand Down

0 comments on commit 8de9fe3

Please sign in to comment.