]> git.baikalelectronics.ru Git - kernel.git/commit
smc: ETH_ALEN as memcpy length for mac addresses
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Thu, 12 Jan 2017 13:57:15 +0000 (14:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2017 14:47:01 +0000 (09:47 -0500)
commitcd1e9e4375bbb27d89851b19688b78f3df0ff893
tree397034c602b8b7ef3982b76193bb63c13583d985
parent520e68a2ae680e6d474a01de4d851ae1f94d2198
smc: ETH_ALEN as memcpy length for mac addresses

When creating an SMC connection, there is a CLC (connection layer control)
handshake to prepare for RDMA traffic. The corresponding code is part of
commit e87d9cdcb532 ("smc: connection and link group creation").
Mac addresses to be exchanged in the handshake are copied with a wrong
length of 12 instead of 6 bytes. Following code overwrites the wrongly
copied code, but nevertheless the correct length should already be used for
the preceding mac address copying. Use ETH_ALEN for the memcpy length with
mac addresses.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Fixes: e87d9cdcb532 ("smc: connection and link group creation")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_clc.c
net/smc/smc_ib.h