Commit 8de9fe3a authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford

IB/srp: Fix a connection setup race

Avoid that receiving a DREQ while RDMA channels are being
established causes target->qp_in_error to be reset.
Signed-off-by: default avatarBart 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: default avatarDoug Ledford <dledford@redhat.com>
parent fb49c8bb
...@@ -993,8 +993,6 @@ static int srp_connect_ch(struct srp_rdma_ch *ch, bool multich) ...@@ -993,8 +993,6 @@ static int srp_connect_ch(struct srp_rdma_ch *ch, bool multich)
WARN_ON_ONCE(!multich && target->connected); WARN_ON_ONCE(!multich && target->connected);
target->qp_in_error = false;
ret = srp_lookup_path(ch); ret = srp_lookup_path(ch);
if (ret) if (ret)
return ret; return ret;
...@@ -1243,6 +1241,9 @@ static int srp_rport_reconnect(struct srp_rport *rport) ...@@ -1243,6 +1241,9 @@ static int srp_rport_reconnect(struct srp_rport *rport)
for (j = 0; j < target->queue_size; ++j) for (j = 0; j < target->queue_size; ++j)
list_add(&ch->tx_ring[j]->list, &ch->free_tx); list_add(&ch->tx_ring[j]->list, &ch->free_tx);
} }
target->qp_in_error = false;
for (i = 0; i < target->ch_count; i++) { for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i]; ch = &target->ch[i];
if (ret || !ch->target) { if (ret || !ch->target) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment