diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2018-05-15 17:05:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-16 17:49:20 +0200 |
commit | 8f332a743cd1943c7d1a1fb806bb0261e35d1b65 (patch) | |
tree | d872941f3dc53f25f2a84df780e4254700369154 /net/smc | |
parent | net/smc: set link inactive before calling smc_lgr_free() (diff) | |
download | linux-8f332a743cd1943c7d1a1fb806bb0261e35d1b65.tar.xz linux-8f332a743cd1943c7d1a1fb806bb0261e35d1b65.zip |
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.c | 2 |
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: |