Browse Source

ipvs: switch to sock_recvmsg()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 8 years ago
parent
commit
7edffd25be
1 changed files with 3 additions and 6 deletions
  1. 3 6
      net/netfilter/ipvs/ip_vs_sync.c

+ 3 - 6
net/netfilter/ipvs/ip_vs_sync.c

@@ -1636,17 +1636,14 @@ static int
 ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
 ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
 {
 {
 	struct msghdr		msg = {NULL,};
 	struct msghdr		msg = {NULL,};
-	struct kvec		iov;
+	struct kvec		iov = {buffer, buflen};
 	int			len;
 	int			len;
 
 
 	EnterFunction(7);
 	EnterFunction(7);
 
 
 	/* Receive a packet */
 	/* Receive a packet */
-	iov.iov_base     = buffer;
-	iov.iov_len      = (size_t)buflen;
-
-	len = kernel_recvmsg(sock, &msg, &iov, 1, buflen, MSG_DONTWAIT);
-
+	iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, buflen);
+	len = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
 	if (len < 0)
 	if (len < 0)
 		return len;
 		return len;