Skip to content

Commit

Permalink
net/smc: call smc_cdc_msg_send() under send_lock
Browse files Browse the repository at this point in the history
Call smc_cdc_msg_send() under the connection send_lock to make sure all
send operations for one connection are serialized.

Signed-off-by: Karsten Graul <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
karstengr authored and davem330 committed Feb 1, 2019
1 parent 33f3fcc commit 2dee25a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/smc/smc_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ static int smcr_cdc_get_slot_and_msg_send(struct smc_connection *conn)
if (rc)
return rc;

return smc_cdc_msg_send(conn, wr_buf, pend);
spin_lock_bh(&conn->send_lock);
rc = smc_cdc_msg_send(conn, wr_buf, pend);
spin_unlock_bh(&conn->send_lock);
return rc;
}

int smc_cdc_get_slot_and_msg_send(struct smc_connection *conn)
Expand Down

0 comments on commit 2dee25a

Please sign in to comment.