aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-09-01 03:29:06 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:18:15 -0400
commitef047f5e1085d6393748d1ee27d6327905f098dc (patch)
treeb1ac74cd97e5e39afedbecbffd8feaf59458d3d8 /net/netlink/af_netlink.c
parent366e4adc0f9ef33f56c62f980a7d83775e64abd0 (diff)
[NET]: Use BUILD_BUG_ON() for checking size of skb->cb.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index a80e4456e204..d56e0d21f919 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1762,8 +1762,6 @@ static struct net_proto_family netlink_family_ops = {
1762 .owner = THIS_MODULE, /* for consistency 8) */ 1762 .owner = THIS_MODULE, /* for consistency 8) */
1763}; 1763};
1764 1764
1765extern void netlink_skb_parms_too_large(void);
1766
1767static int __init netlink_proto_init(void) 1765static int __init netlink_proto_init(void)
1768{ 1766{
1769 struct sk_buff *dummy_skb; 1767 struct sk_buff *dummy_skb;
@@ -1775,8 +1773,7 @@ static int __init netlink_proto_init(void)
1775 if (err != 0) 1773 if (err != 0)
1776 goto out; 1774 goto out;
1777 1775
1778 if (sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb)) 1776 BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb));
1779 netlink_skb_parms_too_large();
1780 1777
1781 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL); 1778 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
1782 if (!nl_table) 1779 if (!nl_table)