Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34633
b: refs/heads/master
c: ef047f5
h: refs/heads/master
i:
  34631: 197c46f
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Sep 22, 2006
1 parent 1b66ee0 commit c20aaf0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 366e4adc0f9ef33f56c62f980a7d83775e64abd0
refs/heads/master: ef047f5e1085d6393748d1ee27d6327905f098dc
5 changes: 1 addition & 4 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,10 +1254,7 @@ static int __init inet_init(void)
struct list_head *r;
int rc = -EINVAL;

if (sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb)) {
printk(KERN_CRIT "%s: panic\n", __FUNCTION__);
goto out;
}
BUILD_BUG_ON(sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb));

rc = proto_register(&tcp_prot, 1);
if (rc)
Expand Down
7 changes: 2 additions & 5 deletions trunk/net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ static int __init inet6_init(void)
struct list_head *r;
int err;

BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb));

#ifdef MODULE
#if 0 /* FIXME --RR */
if (!mod_member_present(&__this_module, can_unload))
Expand All @@ -770,11 +772,6 @@ static int __init inet6_init(void)
#endif
#endif

if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)) {
printk(KERN_CRIT "inet6_proto_init: size fault\n");
return -EINVAL;
}

err = proto_register(&tcpv6_prot, 1);
if (err)
goto out;
Expand Down
5 changes: 1 addition & 4 deletions trunk/net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,8 +1762,6 @@ static struct net_proto_family netlink_family_ops = {
.owner = THIS_MODULE, /* for consistency 8) */
};

extern void netlink_skb_parms_too_large(void);

static int __init netlink_proto_init(void)
{
struct sk_buff *dummy_skb;
Expand All @@ -1775,8 +1773,7 @@ static int __init netlink_proto_init(void)
if (err != 0)
goto out;

if (sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb))
netlink_skb_parms_too_large();
BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb));

nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
if (!nl_table)
Expand Down
5 changes: 1 addition & 4 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,10 +2060,7 @@ static int __init af_unix_init(void)
int rc = -1;
struct sk_buff *dummy_skb;

if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)) {
printk(KERN_CRIT "%s: panic\n", __FUNCTION__);
goto out;
}
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb));

rc = proto_register(&unix_proto, 1);
if (rc != 0) {
Expand Down

0 comments on commit c20aaf0

Please sign in to comment.