From: Stefan Raspl <raspl@linux.ibm.com>
Subject: net/smc: drop messages when link state is inactive
Patch-mainline: v4.18-rc1
Git-commit: 8f332a743cd1943c7d1a1fb806bb0261e35d1b65
References: FATE#325694, LTC#167874, bsc#1113480
Summary: net/smc: SMC-R MVP
Description: Add latest upstream patches to push SMC-R to the MVP level
Upstream-Description:
net/smc: drop messages when link state is inactive
Drop incoming messages when the link is flagged as inactive.
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>
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
net/smc/smc_llc.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -547,6 +547,8 @@ static void smc_llc_rx_handler(struct ib
return; /* short message */
if (llc->raw.hdr.length != sizeof(*llc))
return; /* invalid message */
+ if (link->state == SMC_LNK_INACTIVE)
+ return; /* link not active, drop msg */
switch (llc->raw.hdr.common.type) {
case SMC_LLC_TEST_LINK: