summaryrefslogtreecommitdiffstats
path: root/net/smc
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2018-05-15 17:05:02 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-16 11:49:20 -0400
commit8f332a743cd1943c7d1a1fb806bb0261e35d1b65 (patch)
treed872941f3dc53f25f2a84df780e4254700369154 /net/smc
parent3cf52eb11fa00b8dc8a773893fd808e3a09b3961 (diff)
downloadlinux-8f332a743cd1943c7d1a1fb806bb0261e35d1b65.tar.bz2
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>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_llc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 5d7926cc472c..5800a6b43d83 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -548,6 +548,8 @@ static void smc_llc_rx_handler(struct ib_wc *wc, void *buf)
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: