patch-2.4.4 linux/net/x25/af_x25.c

Next file: linux/net/x25/x25_out.c
Previous file: linux/net/wanrouter/wanproc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -409,6 +409,9 @@
 
 	len = min(len, sizeof(int));
 
+	if (len < 0)
+		return -EINVAL;
+		
 	if (put_user(len, optlen))
 		return -EFAULT;
 
@@ -912,7 +915,7 @@
 
 	size = len + X25_MAX_L2_LEN + X25_EXT_MIN_LEN;
 
-	if ((skb = sock_alloc_send_skb(sk, size, 0, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL)
+	if ((skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL)
 		return err;
 	X25_SKB_CB(skb)->flags = msg->msg_flags;
 
@@ -1283,6 +1286,7 @@
 	sendmsg:	x25_sendmsg,
 	recvmsg:	x25_recvmsg,
 	mmap:		sock_no_mmap,
+	sendpage:	sock_no_sendpage,
 };
 
 #include <linux/smp_lock.h>

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)