aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/rtnetlink.h2
-rw-r--r--net/bridge/br_mdb.c4
-rw-r--r--net/can/gw.c5
-rw-r--r--net/core/fib_rules.c4
-rw-r--r--net/core/neighbour.c6
-rw-r--r--net/core/rtnetlink.c82
-rw-r--r--net/dcb/dcbnl.c2
-rw-r--r--net/decnet/dn_dev.c4
-rw-r--r--net/decnet/dn_fib.c4
-rw-r--r--net/decnet/dn_route.c2
-rw-r--r--net/ipv4/devinet.c7
-rw-r--r--net/ipv4/fib_frontend.c4
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv6/addrconf.c10
-rw-r--r--net/ipv6/addrlabel.c6
-rw-r--r--net/ipv6/route.c6
-rw-r--r--net/phonet/pn_netlink.c4
-rw-r--r--net/sched/act_api.c2
-rw-r--r--net/sched/cls_api.c2
-rw-r--r--net/sched/sch_api.c6
20 files changed, 47 insertions, 117 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 5a15fabd6a75..702664833a53 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -4,7 +4,7 @@
4#include <linux/rtnetlink.h> 4#include <linux/rtnetlink.h>
5#include <net/netlink.h> 5#include <net/netlink.h>
6 6
7typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *); 7typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *);
8typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); 8typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *);
9typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *); 9typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *);
10 10
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index ee79f3f20383..19942e38fd2d 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -382,7 +382,7 @@ static int __br_mdb_add(struct net *net, struct net_bridge *br,
382 return ret; 382 return ret;
383} 383}
384 384
385static int br_mdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 385static int br_mdb_add(struct sk_buff *skb, struct nlmsghdr *nlh)
386{ 386{
387 struct net *net = sock_net(skb->sk); 387 struct net *net = sock_net(skb->sk);
388 struct br_mdb_entry *entry; 388 struct br_mdb_entry *entry;
@@ -458,7 +458,7 @@ unlock:
458 return err; 458 return err;
459} 459}
460 460
461static int br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 461static int br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
462{ 462{
463 struct net_device *dev; 463 struct net_device *dev;
464 struct br_mdb_entry *entry; 464 struct br_mdb_entry *entry;
diff --git a/net/can/gw.c b/net/can/gw.c
index 2d117dc5ebea..2dc619db805a 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -778,8 +778,7 @@ static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod,
778 return 0; 778 return 0;
779} 779}
780 780
781static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh, 781static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
782 void *arg)
783{ 782{
784 struct rtcanmsg *r; 783 struct rtcanmsg *r;
785 struct cgw_job *gwj; 784 struct cgw_job *gwj;
@@ -868,7 +867,7 @@ static void cgw_remove_all_jobs(void)
868 } 867 }
869} 868}
870 869
871static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 870static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh)
872{ 871{
873 struct cgw_job *gwj = NULL; 872 struct cgw_job *gwj = NULL;
874 struct hlist_node *nx; 873 struct hlist_node *nx;
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 58a4ba27dfe3..d5a9f8ead0d8 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -266,7 +266,7 @@ errout:
266 return err; 266 return err;
267} 267}
268 268
269static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 269static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
270{ 270{
271 struct net *net = sock_net(skb->sk); 271 struct net *net = sock_net(skb->sk);
272 struct fib_rule_hdr *frh = nlmsg_data(nlh); 272 struct fib_rule_hdr *frh = nlmsg_data(nlh);
@@ -415,7 +415,7 @@ errout:
415 return err; 415 return err;
416} 416}
417 417
418static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 418static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh)
419{ 419{
420 struct net *net = sock_net(skb->sk); 420 struct net *net = sock_net(skb->sk);
421 struct fib_rule_hdr *frh = nlmsg_data(nlh); 421 struct fib_rule_hdr *frh = nlmsg_data(nlh);
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 3863b8f639c5..c72a646d9f44 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1613,7 +1613,7 @@ int neigh_table_clear(struct neigh_table *tbl)
1613} 1613}
1614EXPORT_SYMBOL(neigh_table_clear); 1614EXPORT_SYMBOL(neigh_table_clear);
1615 1615
1616static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1616static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh)
1617{ 1617{
1618 struct net *net = sock_net(skb->sk); 1618 struct net *net = sock_net(skb->sk);
1619 struct ndmsg *ndm; 1619 struct ndmsg *ndm;
@@ -1677,7 +1677,7 @@ out:
1677 return err; 1677 return err;
1678} 1678}
1679 1679
1680static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1680static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh)
1681{ 1681{
1682 struct net *net = sock_net(skb->sk); 1682 struct net *net = sock_net(skb->sk);
1683 struct ndmsg *ndm; 1683 struct ndmsg *ndm;
@@ -1955,7 +1955,7 @@ static const struct nla_policy nl_ntbl_parm_policy[NDTPA_MAX+1] = {
1955 [NDTPA_LOCKTIME] = { .type = NLA_U64 }, 1955 [NDTPA_LOCKTIME] = { .type = NLA_U64 },
1956}; 1956};
1957 1957
1958static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1958static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh)
1959{ 1959{
1960 struct net *net = sock_net(skb->sk); 1960 struct net *net = sock_net(skb->sk);
1961 struct neigh_table *tbl; 1961 struct neigh_table *tbl;
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9a9b99e1fb70..751f1244b648 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -515,32 +515,6 @@ out:
515 return err; 515 return err;
516} 516}
517 517
518static const int rtm_min[RTM_NR_FAMILIES] =
519{
520 [RTM_FAM(RTM_NEWLINK)] = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
521 [RTM_FAM(RTM_NEWADDR)] = NLMSG_LENGTH(sizeof(struct ifaddrmsg)),
522 [RTM_FAM(RTM_NEWROUTE)] = NLMSG_LENGTH(sizeof(struct rtmsg)),
523 [RTM_FAM(RTM_NEWRULE)] = NLMSG_LENGTH(sizeof(struct fib_rule_hdr)),
524 [RTM_FAM(RTM_NEWQDISC)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
525 [RTM_FAM(RTM_NEWTCLASS)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
526 [RTM_FAM(RTM_NEWTFILTER)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
527 [RTM_FAM(RTM_NEWACTION)] = NLMSG_LENGTH(sizeof(struct tcamsg)),
528 [RTM_FAM(RTM_GETMULTICAST)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
529 [RTM_FAM(RTM_GETANYCAST)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
530};
531
532static const int rta_max[RTM_NR_FAMILIES] =
533{
534 [RTM_FAM(RTM_NEWLINK)] = IFLA_MAX,
535 [RTM_FAM(RTM_NEWADDR)] = IFA_MAX,
536 [RTM_FAM(RTM_NEWROUTE)] = RTA_MAX,
537 [RTM_FAM(RTM_NEWRULE)] = FRA_MAX,
538 [RTM_FAM(RTM_NEWQDISC)] = TCA_MAX,
539 [RTM_FAM(RTM_NEWTCLASS)] = TCA_MAX,
540 [RTM_FAM(RTM_NEWTFILTER)] = TCA_MAX,
541 [RTM_FAM(RTM_NEWACTION)] = TCAA_MAX,
542};
543
544int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, int echo) 518int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, int echo)
545{ 519{
546 struct sock *rtnl = net->rtnl; 520 struct sock *rtnl = net->rtnl;
@@ -1537,7 +1511,7 @@ errout:
1537 return err; 1511 return err;
1538} 1512}
1539 1513
1540static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1514static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
1541{ 1515{
1542 struct net *net = sock_net(skb->sk); 1516 struct net *net = sock_net(skb->sk);
1543 struct ifinfomsg *ifm; 1517 struct ifinfomsg *ifm;
@@ -1578,7 +1552,7 @@ errout:
1578 return err; 1552 return err;
1579} 1553}
1580 1554
1581static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1555static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
1582{ 1556{
1583 struct net *net = sock_net(skb->sk); 1557 struct net *net = sock_net(skb->sk);
1584 const struct rtnl_link_ops *ops; 1558 const struct rtnl_link_ops *ops;
@@ -1709,7 +1683,7 @@ static int rtnl_group_changelink(struct net *net, int group,
1709 return 0; 1683 return 0;
1710} 1684}
1711 1685
1712static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1686static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
1713{ 1687{
1714 struct net *net = sock_net(skb->sk); 1688 struct net *net = sock_net(skb->sk);
1715 const struct rtnl_link_ops *ops; 1689 const struct rtnl_link_ops *ops;
@@ -1864,7 +1838,7 @@ out:
1864 } 1838 }
1865} 1839}
1866 1840
1867static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 1841static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh)
1868{ 1842{
1869 struct net *net = sock_net(skb->sk); 1843 struct net *net = sock_net(skb->sk);
1870 struct ifinfomsg *ifm; 1844 struct ifinfomsg *ifm;
@@ -2081,7 +2055,7 @@ int ndo_dflt_fdb_add(struct ndmsg *ndm,
2081} 2055}
2082EXPORT_SYMBOL(ndo_dflt_fdb_add); 2056EXPORT_SYMBOL(ndo_dflt_fdb_add);
2083 2057
2084static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 2058static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh)
2085{ 2059{
2086 struct net *net = sock_net(skb->sk); 2060 struct net *net = sock_net(skb->sk);
2087 struct ndmsg *ndm; 2061 struct ndmsg *ndm;
@@ -2179,7 +2153,7 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
2179} 2153}
2180EXPORT_SYMBOL(ndo_dflt_fdb_del); 2154EXPORT_SYMBOL(ndo_dflt_fdb_del);
2181 2155
2182static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 2156static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
2183{ 2157{
2184 struct net *net = sock_net(skb->sk); 2158 struct net *net = sock_net(skb->sk);
2185 struct ndmsg *ndm; 2159 struct ndmsg *ndm;
@@ -2478,8 +2452,7 @@ errout:
2478 return err; 2452 return err;
2479} 2453}
2480 2454
2481static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, 2455static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
2482 void *arg)
2483{ 2456{
2484 struct net *net = sock_net(skb->sk); 2457 struct net *net = sock_net(skb->sk);
2485 struct ifinfomsg *ifm; 2458 struct ifinfomsg *ifm;
@@ -2549,8 +2522,7 @@ out:
2549 return err; 2522 return err;
2550} 2523}
2551 2524
2552static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, 2525static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
2553 void *arg)
2554{ 2526{
2555 struct net *net = sock_net(skb->sk); 2527 struct net *net = sock_net(skb->sk);
2556 struct ifinfomsg *ifm; 2528 struct ifinfomsg *ifm;
@@ -2620,10 +2592,6 @@ out:
2620 return err; 2592 return err;
2621} 2593}
2622 2594
2623/* Protected by RTNL sempahore. */
2624static struct rtattr **rta_buf;
2625static int rtattr_max;
2626
2627/* Process one rtnetlink message. */ 2595/* Process one rtnetlink message. */
2628 2596
2629static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) 2597static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
@@ -2631,7 +2599,6 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
2631 struct net *net = sock_net(skb->sk); 2599 struct net *net = sock_net(skb->sk);
2632 rtnl_doit_func doit; 2600 rtnl_doit_func doit;
2633 int sz_idx, kind; 2601 int sz_idx, kind;
2634 int min_len;
2635 int family; 2602 int family;
2636 int type; 2603 int type;
2637 int err; 2604 int err;
@@ -2679,32 +2646,11 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
2679 return err; 2646 return err;
2680 } 2647 }
2681 2648
2682 memset(rta_buf, 0, (rtattr_max * sizeof(struct rtattr *)));
2683
2684 min_len = rtm_min[sz_idx];
2685 if (nlh->nlmsg_len < min_len)
2686 return -EINVAL;
2687
2688 if (nlh->nlmsg_len > min_len) {
2689 int attrlen = nlh->nlmsg_len - NLMSG_ALIGN(min_len);
2690 struct rtattr *attr = (void *)nlh + NLMSG_ALIGN(min_len);
2691
2692 while (RTA_OK(attr, attrlen)) {
2693 unsigned int flavor = attr->rta_type & NLA_TYPE_MASK;
2694 if (flavor) {
2695 if (flavor > rta_max[sz_idx])
2696 return -EINVAL;
2697 rta_buf[flavor-1] = attr;
2698 }
2699 attr = RTA_NEXT(attr, attrlen);
2700 }
2701 }
2702
2703 doit = rtnl_get_doit(family, type); 2649 doit = rtnl_get_doit(family, type);
2704 if (doit == NULL) 2650 if (doit == NULL)
2705 return -EOPNOTSUPP; 2651 return -EOPNOTSUPP;
2706 2652
2707 return doit(skb, nlh, (void *)&rta_buf[0]); 2653 return doit(skb, nlh);
2708} 2654}
2709 2655
2710static void rtnetlink_rcv(struct sk_buff *skb) 2656static void rtnetlink_rcv(struct sk_buff *skb)
@@ -2774,16 +2720,6 @@ static struct pernet_operations rtnetlink_net_ops = {
2774 2720
2775void __init rtnetlink_init(void) 2721void __init rtnetlink_init(void)
2776{ 2722{
2777 int i;
2778
2779 rtattr_max = 0;
2780 for (i = 0; i < ARRAY_SIZE(rta_max); i++)
2781 if (rta_max[i] > rtattr_max)
2782 rtattr_max = rta_max[i];
2783 rta_buf = kmalloc(rtattr_max * sizeof(struct rtattr *), GFP_KERNEL);
2784 if (!rta_buf)
2785 panic("rtnetlink_init: cannot allocate rta_buf\n");
2786
2787 if (register_pernet_subsys(&rtnetlink_net_ops)) 2723 if (register_pernet_subsys(&rtnetlink_net_ops))
2788 panic("rtnetlink_init: cannot initialize rtnetlink\n"); 2724 panic("rtnetlink_init: cannot initialize rtnetlink\n");
2789 2725
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 21291f1abcd6..40d5829ed36a 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1658,7 +1658,7 @@ static const struct reply_func reply_funcs[DCB_CMD_MAX+1] = {
1658 [DCB_CMD_CEE_GET] = { RTM_GETDCB, dcbnl_cee_get }, 1658 [DCB_CMD_CEE_GET] = { RTM_GETDCB, dcbnl_cee_get },
1659}; 1659};
1660 1660
1661static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1661static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
1662{ 1662{
1663 struct net *net = sock_net(skb->sk); 1663 struct net *net = sock_net(skb->sk);
1664 struct net_device *netdev; 1664 struct net_device *netdev;
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index c8da116d84a4..7d9197063ebb 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -563,7 +563,7 @@ static const struct nla_policy dn_ifa_policy[IFA_MAX+1] = {
563 .len = IFNAMSIZ - 1 }, 563 .len = IFNAMSIZ - 1 },
564}; 564};
565 565
566static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 566static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
567{ 567{
568 struct net *net = sock_net(skb->sk); 568 struct net *net = sock_net(skb->sk);
569 struct nlattr *tb[IFA_MAX+1]; 569 struct nlattr *tb[IFA_MAX+1];
@@ -607,7 +607,7 @@ errout:
607 return err; 607 return err;
608} 608}
609 609
610static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 610static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
611{ 611{
612 struct net *net = sock_net(skb->sk); 612 struct net *net = sock_net(skb->sk);
613 struct nlattr *tb[IFA_MAX+1]; 613 struct nlattr *tb[IFA_MAX+1];
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 42a8048fe725..f09305949931 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -511,7 +511,7 @@ static inline u32 rtm_get_table(struct nlattr *attrs[], u8 table)
511 return table; 511 return table;
512} 512}
513 513
514static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 514static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh)
515{ 515{
516 struct net *net = sock_net(skb->sk); 516 struct net *net = sock_net(skb->sk);
517 struct dn_fib_table *tb; 517 struct dn_fib_table *tb;
@@ -536,7 +536,7 @@ static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *
536 return tb->delete(tb, r, attrs, nlh, &NETLINK_CB(skb)); 536 return tb->delete(tb, r, attrs, nlh, &NETLINK_CB(skb));
537} 537}
538 538
539static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 539static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)
540{ 540{
541 struct net *net = sock_net(skb->sk); 541 struct net *net = sock_net(skb->sk);
542 struct dn_fib_table *tb; 542 struct dn_fib_table *tb;
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index b4b3508e77f0..5904429e8d6a 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1616,7 +1616,7 @@ errout:
1616/* 1616/*
1617 * This is called by both endnodes and routers now. 1617 * This is called by both endnodes and routers now.
1618 */ 1618 */
1619static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg) 1619static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
1620{ 1620{
1621 struct net *net = sock_net(in_skb->sk); 1621 struct net *net = sock_net(in_skb->sk);
1622 struct rtmsg *rtm = nlmsg_data(nlh); 1622 struct rtmsg *rtm = nlmsg_data(nlh);
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index af57bbae05b9..20a9f9274f3f 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -536,7 +536,7 @@ struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
536 return NULL; 536 return NULL;
537} 537}
538 538
539static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 539static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
540{ 540{
541 struct net *net = sock_net(skb->sk); 541 struct net *net = sock_net(skb->sk);
542 struct nlattr *tb[IFA_MAX+1]; 542 struct nlattr *tb[IFA_MAX+1];
@@ -775,7 +775,7 @@ static struct in_ifaddr *find_matching_ifa(struct in_ifaddr *ifa)
775 return NULL; 775 return NULL;
776} 776}
777 777
778static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 778static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
779{ 779{
780 struct net *net = sock_net(skb->sk); 780 struct net *net = sock_net(skb->sk);
781 struct in_ifaddr *ifa; 781 struct in_ifaddr *ifa;
@@ -1730,8 +1730,7 @@ static const struct nla_policy devconf_ipv4_policy[NETCONFA_MAX+1] = {
1730}; 1730};
1731 1731
1732static int inet_netconf_get_devconf(struct sk_buff *in_skb, 1732static int inet_netconf_get_devconf(struct sk_buff *in_skb,
1733 struct nlmsghdr *nlh, 1733 struct nlmsghdr *nlh)
1734 void *arg)
1735{ 1734{
1736 struct net *net = sock_net(in_skb->sk); 1735 struct net *net = sock_net(in_skb->sk);
1737 struct nlattr *tb[NETCONFA_MAX+1]; 1736 struct nlattr *tb[NETCONFA_MAX+1];
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index eb4bb12b3eb4..0e74398bc8e6 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -604,7 +604,7 @@ errout:
604 return err; 604 return err;
605} 605}
606 606
607static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 607static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh)
608{ 608{
609 struct net *net = sock_net(skb->sk); 609 struct net *net = sock_net(skb->sk);
610 struct fib_config cfg; 610 struct fib_config cfg;
@@ -626,7 +626,7 @@ errout:
626 return err; 626 return err;
627} 627}
628 628
629static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 629static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)
630{ 630{
631 struct net *net = sock_net(skb->sk); 631 struct net *net = sock_net(skb->sk);
632 struct fib_config cfg; 632 struct fib_config cfg;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 6e2851464f8f..550781a17b34 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2311,7 +2311,7 @@ nla_put_failure:
2311 return -EMSGSIZE; 2311 return -EMSGSIZE;
2312} 2312}
2313 2313
2314static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg) 2314static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
2315{ 2315{
2316 struct net *net = sock_net(in_skb->sk); 2316 struct net *net = sock_net(in_skb->sk);
2317 struct rtmsg *rtm; 2317 struct rtmsg *rtm;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fa36a677490f..15794fdaf028 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -544,8 +544,7 @@ static const struct nla_policy devconf_ipv6_policy[NETCONFA_MAX+1] = {
544}; 544};
545 545
546static int inet6_netconf_get_devconf(struct sk_buff *in_skb, 546static int inet6_netconf_get_devconf(struct sk_buff *in_skb,
547 struct nlmsghdr *nlh, 547 struct nlmsghdr *nlh)
548 void *arg)
549{ 548{
550 struct net *net = sock_net(in_skb->sk); 549 struct net *net = sock_net(in_skb->sk);
551 struct nlattr *tb[NETCONFA_MAX+1]; 550 struct nlattr *tb[NETCONFA_MAX+1];
@@ -3578,7 +3577,7 @@ static const struct nla_policy ifa_ipv6_policy[IFA_MAX+1] = {
3578}; 3577};
3579 3578
3580static int 3579static int
3581inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 3580inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
3582{ 3581{
3583 struct net *net = sock_net(skb->sk); 3582 struct net *net = sock_net(skb->sk);
3584 struct ifaddrmsg *ifm; 3583 struct ifaddrmsg *ifm;
@@ -3644,7 +3643,7 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
3644} 3643}
3645 3644
3646static int 3645static int
3647inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 3646inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
3648{ 3647{
3649 struct net *net = sock_net(skb->sk); 3648 struct net *net = sock_net(skb->sk);
3650 struct ifaddrmsg *ifm; 3649 struct ifaddrmsg *ifm;
@@ -3983,8 +3982,7 @@ static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb)
3983 return inet6_dump_addr(skb, cb, type); 3982 return inet6_dump_addr(skb, cb, type);
3984} 3983}
3985 3984
3986static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh, 3985static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh)
3987 void *arg)
3988{ 3986{
3989 struct net *net = sock_net(in_skb->sk); 3987 struct net *net = sock_net(in_skb->sk);
3990 struct ifaddrmsg *ifm; 3988 struct ifaddrmsg *ifm;
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 6f226c850c91..f083a583a05c 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -414,8 +414,7 @@ static const struct nla_policy ifal_policy[IFAL_MAX+1] = {
414 [IFAL_LABEL] = { .len = sizeof(u32), }, 414 [IFAL_LABEL] = { .len = sizeof(u32), },
415}; 415};
416 416
417static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh, 417static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh)
418 void *arg)
419{ 418{
420 struct net *net = sock_net(skb->sk); 419 struct net *net = sock_net(skb->sk);
421 struct ifaddrlblmsg *ifal; 420 struct ifaddrlblmsg *ifal;
@@ -530,8 +529,7 @@ static inline int ip6addrlbl_msgsize(void)
530 + nla_total_size(4); /* IFAL_LABEL */ 529 + nla_total_size(4); /* IFAL_LABEL */
531} 530}
532 531
533static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, 532static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh)
534 void *arg)
535{ 533{
536 struct net *net = sock_net(in_skb->sk); 534 struct net *net = sock_net(in_skb->sk);
537 struct ifaddrlblmsg *ifal; 535 struct ifaddrlblmsg *ifal;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e5fe0041adfa..ad0aa6b0b86a 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2355,7 +2355,7 @@ beginning:
2355 return last_err; 2355 return last_err;
2356} 2356}
2357 2357
2358static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 2358static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh)
2359{ 2359{
2360 struct fib6_config cfg; 2360 struct fib6_config cfg;
2361 int err; 2361 int err;
@@ -2370,7 +2370,7 @@ static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *a
2370 return ip6_route_del(&cfg); 2370 return ip6_route_del(&cfg);
2371} 2371}
2372 2372
2373static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 2373static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh)
2374{ 2374{
2375 struct fib6_config cfg; 2375 struct fib6_config cfg;
2376 int err; 2376 int err;
@@ -2562,7 +2562,7 @@ int rt6_dump_route(struct rt6_info *rt, void *p_arg)
2562 prefix, 0, NLM_F_MULTI); 2562 prefix, 0, NLM_F_MULTI);
2563} 2563}
2564 2564
2565static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) 2565static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh)
2566{ 2566{
2567 struct net *net = sock_net(in_skb->sk); 2567 struct net *net = sock_net(in_skb->sk);
2568 struct nlattr *tb[RTA_MAX+1]; 2568 struct nlattr *tb[RTA_MAX+1];
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c
index 0193630d3061..dc15f4300808 100644
--- a/net/phonet/pn_netlink.c
+++ b/net/phonet/pn_netlink.c
@@ -61,7 +61,7 @@ static const struct nla_policy ifa_phonet_policy[IFA_MAX+1] = {
61 [IFA_LOCAL] = { .type = NLA_U8 }, 61 [IFA_LOCAL] = { .type = NLA_U8 },
62}; 62};
63 63
64static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr) 64static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
65{ 65{
66 struct net *net = sock_net(skb->sk); 66 struct net *net = sock_net(skb->sk);
67 struct nlattr *tb[IFA_MAX+1]; 67 struct nlattr *tb[IFA_MAX+1];
@@ -224,7 +224,7 @@ static const struct nla_policy rtm_phonet_policy[RTA_MAX+1] = {
224 [RTA_OIF] = { .type = NLA_U32 }, 224 [RTA_OIF] = { .type = NLA_U32 },
225}; 225};
226 226
227static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr) 227static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
228{ 228{
229 struct net *net = sock_net(skb->sk); 229 struct net *net = sock_net(skb->sk);
230 struct nlattr *tb[RTA_MAX+1]; 230 struct nlattr *tb[RTA_MAX+1];
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 8579c4bb20c9..fd7072827a40 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -982,7 +982,7 @@ done:
982 return ret; 982 return ret;
983} 983}
984 984
985static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) 985static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)
986{ 986{
987 struct net *net = sock_net(skb->sk); 987 struct net *net = sock_net(skb->sk);
988 struct nlattr *tca[TCA_ACT_MAX + 1]; 988 struct nlattr *tca[TCA_ACT_MAX + 1];
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 964f5e4f4b8a..9a04b981bc13 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -118,7 +118,7 @@ static inline u32 tcf_auto_prio(struct tcf_proto *tp)
118 118
119/* Add/change/delete/get a filter node */ 119/* Add/change/delete/get a filter node */
120 120
121static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) 121static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
122{ 122{
123 struct net *net = sock_net(skb->sk); 123 struct net *net = sock_net(skb->sk);
124 struct nlattr *tca[TCA_MAX + 1]; 124 struct nlattr *tca[TCA_MAX + 1];
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c297e2a8e2a1..0bbce229ac69 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -971,7 +971,7 @@ check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w)
971 * Delete/get qdisc. 971 * Delete/get qdisc.
972 */ 972 */
973 973
974static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) 974static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
975{ 975{
976 struct net *net = sock_net(skb->sk); 976 struct net *net = sock_net(skb->sk);
977 struct tcmsg *tcm = nlmsg_data(n); 977 struct tcmsg *tcm = nlmsg_data(n);
@@ -1038,7 +1038,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1038 * Create/change qdisc. 1038 * Create/change qdisc.
1039 */ 1039 */
1040 1040
1041static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) 1041static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
1042{ 1042{
1043 struct net *net = sock_net(skb->sk); 1043 struct net *net = sock_net(skb->sk);
1044 struct tcmsg *tcm; 1044 struct tcmsg *tcm;
@@ -1372,7 +1372,7 @@ done:
1372 1372
1373 1373
1374 1374
1375static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) 1375static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n)
1376{ 1376{
1377 struct net *net = sock_net(skb->sk); 1377 struct net *net = sock_net(skb->sk);
1378 struct tcmsg *tcm = nlmsg_data(n); 1378 struct tcmsg *tcm = nlmsg_data(n);