summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-09 08:19:48 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-10 08:38:23 +0100
commitfab25745912a82baa7c9e73f59079108d56b5d26 (patch)
tree12cdf0a2dd72ca03e98d65677c04342345245a14 /net/netlink
parentipv6: Use FIELD_SIZEOF() in inet6_init(). (diff)
downloadlinux-fab25745912a82baa7c9e73f59079108d56b5d26.tar.xz
linux-fab25745912a82baa7c9e73f59079108d56b5d26.zip
netlink: Use FIELD_SIZEOF() in netlink_proto_init().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c0353d55d56f..74827e3b26a1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2185,7 +2185,6 @@ static struct pernet_operations __net_initdata netlink_net_ops = {
static int __init netlink_proto_init(void)
{
- struct sk_buff *dummy_skb;
int i;
unsigned long limit;
unsigned int order;
@@ -2194,7 +2193,7 @@ static int __init netlink_proto_init(void)
if (err != 0)
goto out;
- BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb));
+ BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
if (!nl_table)