summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2019-01-30 18:51:06 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-01 14:45:45 -0800
commit2dee25af42f99b476d5916aeac5c994e4dcc910b (patch)
treeb27d34e01aade5db71de45dbe45eeeb8bc6c1b19 /net
parent33f3fcc290671590821ff3c0c9396db1ec9b7d4c (diff)
downloadlinux-2dee25af42f99b476d5916aeac5c994e4dcc910b.tar.bz2
net/smc: call smc_cdc_msg_send() under send_lock
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 <kgraul@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/smc/smc_cdc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c
index db83332ac1c8..1c5333d494e9 100644
--- a/net/smc/smc_cdc.c
+++ b/net/smc/smc_cdc.c
@@ -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)