* [PATCH net 0/1] net/smc: fix clc problem
@ 2018-03-27 8:43 Ursula Braun
2018-03-27 8:43 ` [PATCH net 1/1] net/smc: use announced length in sock_recvmsg() Ursula Braun
0 siblings, 1 reply; 3+ messages in thread
From: Ursula Braun @ 2018-03-27 8:43 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, schwidefsky, heiko.carstens, raspl, ubraun
Dave,
the conversion from kernel_recvmsg() to sock_recvmsg() introduced a
problem for SMC. This patch fixes it.
Thanks, Ursula
Ursula Braun (1):
net/smc: use announced length in sock_recvmsg()
net/smc/smc_clc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.13.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net 1/1] net/smc: use announced length in sock_recvmsg()
2018-03-27 8:43 [PATCH net 0/1] net/smc: fix clc problem Ursula Braun
@ 2018-03-27 8:43 ` Ursula Braun
2018-03-27 16:00 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Ursula Braun @ 2018-03-27 8:43 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, schwidefsky, heiko.carstens, raspl, ubraun
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: d63d271ce2b5ce ("smc: switch to sock_recvmsg()")
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
net/smc/smc_clc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c
index 8ac51583a063..15c213250606 100644
--- a/net/smc/smc_clc.c
+++ b/net/smc/smc_clc.c
@@ -133,7 +133,7 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
/* receive the complete CLC message */
memset(&msg, 0, sizeof(struct msghdr));
- iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &vec, 1, buflen);
+ iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &vec, 1, datlen);
krflags = MSG_WAITALL;
smc->clcsock->sk->sk_rcvtimeo = CLC_WAIT_TIME;
len = sock_recvmsg(smc->clcsock, &msg, krflags);
--
2.13.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/1] net/smc: use announced length in sock_recvmsg()
2018-03-27 8:43 ` [PATCH net 1/1] net/smc: use announced length in sock_recvmsg() Ursula Braun
@ 2018-03-27 16:00 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-03-27 16:00 UTC (permalink / raw)
To: ubraun; +Cc: netdev, linux-s390, schwidefsky, heiko.carstens, raspl
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
Date: Tue, 27 Mar 2018 10:43:50 +0200
> 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: d63d271ce2b5ce ("smc: switch to sock_recvmsg()")
> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-27 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 8:43 [PATCH net 0/1] net/smc: fix clc problem Ursula Braun
2018-03-27 8:43 ` [PATCH net 1/1] net/smc: use announced length in sock_recvmsg() Ursula Braun
2018-03-27 16:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).