patch-2.4.0-test3 linux/net/netlink/af_netlink.c

Next file: linux/net/netlink/netlink_dev.c
Previous file: linux/net/khttpd/security.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/net/netlink/af_netlink.c linux/net/netlink/af_netlink.c
@@ -576,6 +576,9 @@
 			goto out;
 	}
 
+	err = -EMSGSIZE;
+	if ((unsigned)len > sk->sndbuf-32)
+		goto out;
 	err = -ENOBUFS;
 	skb = alloc_skb(len, GFP_KERNEL);
 	if (skb==NULL)

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