]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: use announced length in sock_recvmsg()
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Tue, 27 Mar 2018 08:43:50 +0000 (10:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Mar 2018 15:59:49 +0000 (11:59 -0400)
commit7b0df6746a9b8627c3fc4ac038a147edd9fb5032
treed8b0c9a66ef652d1dca49cd06ed83846fe9816f8
parent54b3745bc1133104cc01af6f75be45a01d43e4c0
net/smc: use announced length in sock_recvmsg()

Not every CLC proposal message needs the maximum buffer length.
Due to the MSG_WAITALL flag, it is important to use the peeked
real length when receiving the message.

Fixes: f40a986b3ca8c8 ("smc: switch to sock_recvmsg()")
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_clc.c