]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: fix toleration of fake add_link messages
authorKarsten Graul <kgraul@linux.ibm.com>
Thu, 3 Sep 2020 19:53:15 +0000 (21:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 23:52:33 +0000 (16:52 -0700)
commitf3eedd9ef37512d35762b7fb23729057110a968a
tree7aa63d579c048a3455ebc7ab54ff82b513db8f21
parentc1842f8cc997c4cd2291d32fa6914ec54ee9c707
net/smc: fix toleration of fake add_link messages

Older SMCR implementations had no link failover support and used one
link only. Because the handshake protocol requires to try the
establishment of a second link the old code sent a fake add_link message
and declined any server response afterwards.
The current code supports multiple links and inspects the received fake
add_link message more closely. To tolerate the fake add_link messages
smc_llc_is_local_add_link() needs an improved check of the message to
be able to separate between locally enqueued and fake add_link messages.
And smc_llc_cli_add_link() needs to check if the provided qp_mtu size is
invalid and reject the add_link request in that case.

Fixes: 47ed2897275f ("net/smc: move add link processing for new device into llc layer")
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_llc.c