patch-pre2.0.13 linux/net/socket.c

Next file: linux/scripts/tkgen.c
Previous file: linux/net/netsyms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.12/linux/net/socket.c linux/net/socket.c
@@ -1113,7 +1113,7 @@
 	struct socket *sock;
 	struct file *file;
 	char address[MAX_SOCK_ADDR];
-	struct iovec iov[MAX_IOVEC];
+	struct iovec iov[UIO_MAXIOV];
 	struct msghdr msg_sys;
 	int err;
 	int total_len;
@@ -1134,7 +1134,7 @@
 	memcpy_fromfs(&msg_sys,msg,sizeof(struct msghdr));
 
 	/* do not move before msg_sys is valid */
-	if(msg_sys.msg_iovlen>MAX_IOVEC)
+	if(msg_sys.msg_iovlen>UIO_MAXIOV)
 		return -EINVAL;
 
 	/* This will also move the address data into kernel space */
@@ -1154,7 +1154,7 @@
 {
 	struct socket *sock;
 	struct file *file;
-	struct iovec iov[MAX_IOVEC];
+	struct iovec iov[UIO_MAXIOV];
 	struct msghdr msg_sys;
 	int err;
 	int total_len;
@@ -1177,7 +1177,7 @@
 	if(err)
 		return err;
 	memcpy_fromfs(&msg_sys,msg,sizeof(struct msghdr));
-	if(msg_sys.msg_iovlen>MAX_IOVEC)
+	if(msg_sys.msg_iovlen>UIO_MAXIOV)
 		return -EINVAL;
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this