From b60b0887e8c23dfd05eec0f20a591c8ef56092c4 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 26 Nov 2013 16:51:41 +0100 Subject: [PATCH] net: disable MSG_DONTWAIT --- kernel/mars_net.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/mars_net.c b/kernel/mars_net.c index 294348ac..95342c58 100644 --- a/kernel/mars_net.c +++ b/kernel/mars_net.c @@ -510,11 +510,7 @@ int mars_recv_raw(struct mars_socket *msock, void *buf, int minlen, int maxlen) struct msghdr msg = { .msg_iovlen = 1, .msg_iov = (struct iovec*)&iov, -#if 0 // There seems to be a race in the kernel: sometimes kernel_recvmsg() blocks forever on a shutdown socket even when sk->sk_rcvtimeo is set. Workaround by using noblocking IO (although it is conceptually broken and may lead to unnecessary throughput degradation) - .msg_flags = 0 | MSG_WAITALL | MSG_NOSIGNAL, -#else - .msg_flags = 0 | MSG_DONTWAIT | MSG_NOSIGNAL, -#endif + .msg_flags = MSG_NOSIGNAL, }; struct socket *sock = msock->s_socket;