Blob Blame History Raw
From: Stefan Raspl <raspl@linux.ibm.com>
Subject: net/smc: no cursor update send in state SMC_INIT
Patch-mainline: v4.18-rc8
Git-commit: 5607016cd1bbec538050b495669c3c8c5a2cee80
References: FATE#325698, LTC#167867, bsc#1113481

Description:  smc: Latest upstream fixes and extensions up to 8/17/2018

Upstream-Description:

              net/smc: no cursor update send in state SMC_INIT

              If a writer blocked condition is received without data, the current
              consumer cursor is immediately sent. Servers could already receive this
              condition in state SMC_INIT without finished tx-setup. This patch
              avoids sending a consumer cursor update in this case.

              Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
              Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 net/smc/smc_cdc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/smc/smc_cdc.c
+++ b/net/smc/smc_cdc.c
@@ -232,7 +232,8 @@ static void smc_cdc_msg_recv_action(stru
 			/* force immediate tx of current consumer cursor, but
 			 * under send_lock to guarantee arrival in seqno-order
 			 */
-			smc_tx_sndbuf_nonempty(conn);
+			if (smc->sk.sk_state != SMC_INIT)
+				smc_tx_sndbuf_nonempty(conn);
 		}
 	}