diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 00:53:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 00:53:00 +0000 |
commit | b8553086288629b4efb77e97f5582e08bc50ad65 (patch) | |
tree | 0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /net/netlink | |
parent | 75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff) |
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 3 | ||||
-rw-r--r-- | net/netlink/netlink_dev.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 4f4263d56..be011a234 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -576,6 +576,9 @@ static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, int len, goto out; } + err = -EMSGSIZE; + if ((unsigned)len > sk->sndbuf-32) + goto out; err = -ENOBUFS; skb = alloc_skb(len, GFP_KERNEL); if (skb==NULL) diff --git a/net/netlink/netlink_dev.c b/net/netlink/netlink_dev.c index 4da257555..d0e187aee 100644 --- a/net/netlink/netlink_dev.c +++ b/net/netlink/netlink_dev.c @@ -190,7 +190,7 @@ int __init init_netlink(void) printk(KERN_ERR "netlink: unable to get major %d\n", NETLINK_MAJOR); return -EIO; } - devfs_handle = devfs_mk_dir (NULL, "netlink", 7, NULL); + devfs_handle = devfs_mk_dir (NULL, "netlink", NULL); /* Someone tell me the official names for the uppercase ones */ make_devfs_entries ("route", 0); make_devfs_entries ("skip", 1); |