aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/netlink.c2
-rw-r--r--include/linux/netlink.h6
-rw-r--r--include/net/rtnetlink.h7
-rw-r--r--net/bridge/br_netlink.c15
-rw-r--r--net/core/fib_rules.c6
-rw-r--r--net/core/neighbour.c11
-rw-r--r--net/core/rtnetlink.c60
-rw-r--r--net/dcb/dcbnl.c4
-rw-r--r--net/decnet/dn_dev.c6
-rw-r--r--net/decnet/dn_fib.c4
-rw-r--r--net/decnet/dn_route.c5
-rw-r--r--net/ipv4/devinet.c6
-rw-r--r--net/ipv4/fib_frontend.c6
-rw-r--r--net/ipv4/inet_diag.c2
-rw-r--r--net/ipv4/ipmr.c3
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv6/addrconf.c16
-rw-r--r--net/ipv6/addrlabel.c9
-rw-r--r--net/ipv6/ip6_fib.c3
-rw-r--r--net/ipv6/ip6mr.c3
-rw-r--r--net/ipv6/route.c6
-rw-r--r--net/netfilter/ipset/ip_set_core.c2
-rw-r--r--net/netfilter/nf_conntrack_netlink.c4
-rw-r--r--net/netlink/af_netlink.c17
-rw-r--r--net/netlink/genetlink.c2
-rw-r--r--net/phonet/pn_netlink.c13
-rw-r--r--net/sched/act_api.c7
-rw-r--r--net/sched/cls_api.c6
-rw-r--r--net/sched/sch_api.c12
-rw-r--r--net/xfrm/xfrm_user.c3
30 files changed, 158 insertions, 90 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 4a5abaf0a25c..9227f4acd79c 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -148,7 +148,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
148 return -EINVAL; 148 return -EINVAL;
149 return netlink_dump_start(nls, skb, nlh, 149 return netlink_dump_start(nls, skb, nlh,
150 client->cb_table[op].dump, 150 client->cb_table[op].dump,
151 NULL); 151 NULL, 0);
152 } 152 }
153 } 153 }
154 154
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index a9dd89552f9c..fdd0188a167e 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -221,7 +221,8 @@ struct netlink_callback {
221 int (*dump)(struct sk_buff * skb, 221 int (*dump)(struct sk_buff * skb,
222 struct netlink_callback *cb); 222 struct netlink_callback *cb);
223 int (*done)(struct netlink_callback *cb); 223 int (*done)(struct netlink_callback *cb);
224 int family; 224 u16 family;
225 u16 min_dump_alloc;
225 long args[6]; 226 long args[6];
226}; 227};
227 228
@@ -259,7 +260,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
259extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, 260extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
260 const struct nlmsghdr *nlh, 261 const struct nlmsghdr *nlh,
261 int (*dump)(struct sk_buff *skb, struct netlink_callback*), 262 int (*dump)(struct sk_buff *skb, struct netlink_callback*),
262 int (*done)(struct netlink_callback*)); 263 int (*done)(struct netlink_callback*),
264 u16 min_dump_alloc);
263 265
264 266
265#define NL_NONROOT_RECV 0x1 267#define NL_NONROOT_RECV 0x1
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 4093ca78cf60..678f1ffaf843 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -6,11 +6,14 @@
6 6
7typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *); 7typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *);
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 *);
9 10
10extern int __rtnl_register(int protocol, int msgtype, 11extern int __rtnl_register(int protocol, int msgtype,
11 rtnl_doit_func, rtnl_dumpit_func); 12 rtnl_doit_func, rtnl_dumpit_func,
13 rtnl_calcit_func);
12extern void rtnl_register(int protocol, int msgtype, 14extern void rtnl_register(int protocol, int msgtype,
13 rtnl_doit_func, rtnl_dumpit_func); 15 rtnl_doit_func, rtnl_dumpit_func,
16 rtnl_calcit_func);
14extern int rtnl_unregister(int protocol, int msgtype); 17extern int rtnl_unregister(int protocol, int msgtype);
15extern void rtnl_unregister_all(int protocol); 18extern void rtnl_unregister_all(int protocol);
16 19
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index ffb0dc4cc0e8..6814083a92f4 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -218,19 +218,24 @@ int __init br_netlink_init(void)
218 if (err < 0) 218 if (err < 0)
219 goto err1; 219 goto err1;
220 220
221 err = __rtnl_register(PF_BRIDGE, RTM_GETLINK, NULL, br_dump_ifinfo); 221 err = __rtnl_register(PF_BRIDGE, RTM_GETLINK, NULL,
222 br_dump_ifinfo, NULL);
222 if (err) 223 if (err)
223 goto err2; 224 goto err2;
224 err = __rtnl_register(PF_BRIDGE, RTM_SETLINK, br_rtm_setlink, NULL); 225 err = __rtnl_register(PF_BRIDGE, RTM_SETLINK,
226 br_rtm_setlink, NULL, NULL);
225 if (err) 227 if (err)
226 goto err3; 228 goto err3;
227 err = __rtnl_register(PF_BRIDGE, RTM_NEWNEIGH, br_fdb_add, NULL); 229 err = __rtnl_register(PF_BRIDGE, RTM_NEWNEIGH,
230 br_fdb_add, NULL, NULL);
228 if (err) 231 if (err)
229 goto err3; 232 goto err3;
230 err = __rtnl_register(PF_BRIDGE, RTM_DELNEIGH, br_fdb_delete, NULL); 233 err = __rtnl_register(PF_BRIDGE, RTM_DELNEIGH,
234 br_fdb_delete, NULL, NULL);
231 if (err) 235 if (err)
232 goto err3; 236 goto err3;
233 err = __rtnl_register(PF_BRIDGE, RTM_GETNEIGH, NULL, br_fdb_dump); 237 err = __rtnl_register(PF_BRIDGE, RTM_GETNEIGH,
238 NULL, br_fdb_dump, NULL);
234 if (err) 239 if (err)
235 goto err3; 240 goto err3;
236 241
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 008dc70b064b..e7ab0c0285b5 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -740,9 +740,9 @@ static struct pernet_operations fib_rules_net_ops = {
740static int __init fib_rules_init(void) 740static int __init fib_rules_init(void)
741{ 741{
742 int err; 742 int err;
743 rtnl_register(PF_UNSPEC, RTM_NEWRULE, fib_nl_newrule, NULL); 743 rtnl_register(PF_UNSPEC, RTM_NEWRULE, fib_nl_newrule, NULL, NULL);
744 rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL); 744 rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL, NULL);
745 rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule); 745 rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule, NULL);
746 746
747 err = register_pernet_subsys(&fib_rules_net_ops); 747 err = register_pernet_subsys(&fib_rules_net_ops);
748 if (err < 0) 748 if (err < 0)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 799f06e03a22..ceb505b1507c 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2909,12 +2909,13 @@ EXPORT_SYMBOL(neigh_sysctl_unregister);
2909 2909
2910static int __init neigh_init(void) 2910static int __init neigh_init(void)
2911{ 2911{
2912 rtnl_register(PF_UNSPEC, RTM_NEWNEIGH, neigh_add, NULL); 2912 rtnl_register(PF_UNSPEC, RTM_NEWNEIGH, neigh_add, NULL, NULL);
2913 rtnl_register(PF_UNSPEC, RTM_DELNEIGH, neigh_delete, NULL); 2913 rtnl_register(PF_UNSPEC, RTM_DELNEIGH, neigh_delete, NULL, NULL);
2914 rtnl_register(PF_UNSPEC, RTM_GETNEIGH, NULL, neigh_dump_info); 2914 rtnl_register(PF_UNSPEC, RTM_GETNEIGH, NULL, neigh_dump_info, NULL);
2915 2915
2916 rtnl_register(PF_UNSPEC, RTM_GETNEIGHTBL, NULL, neightbl_dump_info); 2916 rtnl_register(PF_UNSPEC, RTM_GETNEIGHTBL, NULL, neightbl_dump_info,
2917 rtnl_register(PF_UNSPEC, RTM_SETNEIGHTBL, neightbl_set, NULL); 2917 NULL);
2918 rtnl_register(PF_UNSPEC, RTM_SETNEIGHTBL, neightbl_set, NULL, NULL);
2918 2919
2919 return 0; 2920 return 0;
2920} 2921}
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index abd936d8a716..a798fc6f2aa1 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -56,9 +56,11 @@
56struct rtnl_link { 56struct rtnl_link {
57 rtnl_doit_func doit; 57 rtnl_doit_func doit;
58 rtnl_dumpit_func dumpit; 58 rtnl_dumpit_func dumpit;
59 rtnl_calcit_func calcit;
59}; 60};
60 61
61static DEFINE_MUTEX(rtnl_mutex); 62static DEFINE_MUTEX(rtnl_mutex);
63static u16 min_ifinfo_dump_size;
62 64
63void rtnl_lock(void) 65void rtnl_lock(void)
64{ 66{
@@ -144,12 +146,28 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
144 return tab ? tab[msgindex].dumpit : NULL; 146 return tab ? tab[msgindex].dumpit : NULL;
145} 147}
146 148
149static rtnl_calcit_func rtnl_get_calcit(int protocol, int msgindex)
150{
151 struct rtnl_link *tab;
152
153 if (protocol <= RTNL_FAMILY_MAX)
154 tab = rtnl_msg_handlers[protocol];
155 else
156 tab = NULL;
157
158 if (tab == NULL || tab[msgindex].calcit == NULL)
159 tab = rtnl_msg_handlers[PF_UNSPEC];
160
161 return tab ? tab[msgindex].calcit : NULL;
162}
163
147/** 164/**
148 * __rtnl_register - Register a rtnetlink message type 165 * __rtnl_register - Register a rtnetlink message type
149 * @protocol: Protocol family or PF_UNSPEC 166 * @protocol: Protocol family or PF_UNSPEC
150 * @msgtype: rtnetlink message type 167 * @msgtype: rtnetlink message type
151 * @doit: Function pointer called for each request message 168 * @doit: Function pointer called for each request message
152 * @dumpit: Function pointer called for each dump request (NLM_F_DUMP) message 169 * @dumpit: Function pointer called for each dump request (NLM_F_DUMP) message
170 * @calcit: Function pointer to calc size of dump message
153 * 171 *
154 * Registers the specified function pointers (at least one of them has 172 * Registers the specified function pointers (at least one of them has
155 * to be non-NULL) to be called whenever a request message for the 173 * to be non-NULL) to be called whenever a request message for the
@@ -162,7 +180,8 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
162 * Returns 0 on success or a negative error code. 180 * Returns 0 on success or a negative error code.
163 */ 181 */
164int __rtnl_register(int protocol, int msgtype, 182int __rtnl_register(int protocol, int msgtype,
165 rtnl_doit_func doit, rtnl_dumpit_func dumpit) 183 rtnl_doit_func doit, rtnl_dumpit_func dumpit,
184 rtnl_calcit_func calcit)
166{ 185{
167 struct rtnl_link *tab; 186 struct rtnl_link *tab;
168 int msgindex; 187 int msgindex;
@@ -185,6 +204,9 @@ int __rtnl_register(int protocol, int msgtype,
185 if (dumpit) 204 if (dumpit)
186 tab[msgindex].dumpit = dumpit; 205 tab[msgindex].dumpit = dumpit;
187 206
207 if (calcit)
208 tab[msgindex].calcit = calcit;
209
188 return 0; 210 return 0;
189} 211}
190EXPORT_SYMBOL_GPL(__rtnl_register); 212EXPORT_SYMBOL_GPL(__rtnl_register);
@@ -199,9 +221,10 @@ EXPORT_SYMBOL_GPL(__rtnl_register);
199 * of memory implies no sense in continuing. 221 * of memory implies no sense in continuing.
200 */ 222 */
201void rtnl_register(int protocol, int msgtype, 223void rtnl_register(int protocol, int msgtype,
202 rtnl_doit_func doit, rtnl_dumpit_func dumpit) 224 rtnl_doit_func doit, rtnl_dumpit_func dumpit,
225 rtnl_calcit_func calcit)
203{ 226{
204 if (__rtnl_register(protocol, msgtype, doit, dumpit) < 0) 227 if (__rtnl_register(protocol, msgtype, doit, dumpit, calcit) < 0)
205 panic("Unable to register rtnetlink message handler, " 228 panic("Unable to register rtnetlink message handler, "
206 "protocol = %d, message type = %d\n", 229 "protocol = %d, message type = %d\n",
207 protocol, msgtype); 230 protocol, msgtype);
@@ -1818,6 +1841,11 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
1818 return err; 1841 return err;
1819} 1842}
1820 1843
1844static u16 rtnl_calcit(struct sk_buff *skb)
1845{
1846 return min_ifinfo_dump_size;
1847}
1848
1821static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) 1849static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
1822{ 1850{
1823 int idx; 1851 int idx;
@@ -1847,11 +1875,14 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
1847 struct net *net = dev_net(dev); 1875 struct net *net = dev_net(dev);
1848 struct sk_buff *skb; 1876 struct sk_buff *skb;
1849 int err = -ENOBUFS; 1877 int err = -ENOBUFS;
1878 size_t if_info_size;
1850 1879
1851 skb = nlmsg_new(if_nlmsg_size(dev), GFP_KERNEL); 1880 skb = nlmsg_new((if_info_size = if_nlmsg_size(dev)), GFP_KERNEL);
1852 if (skb == NULL) 1881 if (skb == NULL)
1853 goto errout; 1882 goto errout;
1854 1883
1884 min_ifinfo_dump_size = max_t(u16, if_info_size, min_ifinfo_dump_size);
1885
1855 err = rtnl_fill_ifinfo(skb, dev, type, 0, 0, change, 0); 1886 err = rtnl_fill_ifinfo(skb, dev, type, 0, 0, change, 0);
1856 if (err < 0) { 1887 if (err < 0) {
1857 /* -EMSGSIZE implies BUG in if_nlmsg_size() */ 1888 /* -EMSGSIZE implies BUG in if_nlmsg_size() */
@@ -1902,14 +1933,20 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
1902 if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) { 1933 if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
1903 struct sock *rtnl; 1934 struct sock *rtnl;
1904 rtnl_dumpit_func dumpit; 1935 rtnl_dumpit_func dumpit;
1936 rtnl_calcit_func calcit;
1937 u16 min_dump_alloc = 0;
1905 1938
1906 dumpit = rtnl_get_dumpit(family, type); 1939 dumpit = rtnl_get_dumpit(family, type);
1907 if (dumpit == NULL) 1940 if (dumpit == NULL)
1908 return -EOPNOTSUPP; 1941 return -EOPNOTSUPP;
1942 calcit = rtnl_get_calcit(family, type);
1943 if (calcit)
1944 min_dump_alloc = calcit(skb);
1909 1945
1910 __rtnl_unlock(); 1946 __rtnl_unlock();
1911 rtnl = net->rtnl; 1947 rtnl = net->rtnl;
1912 err = netlink_dump_start(rtnl, skb, nlh, dumpit, NULL); 1948 err = netlink_dump_start(rtnl, skb, nlh, dumpit,
1949 NULL, min_dump_alloc);
1913 rtnl_lock(); 1950 rtnl_lock();
1914 return err; 1951 return err;
1915 } 1952 }
@@ -2019,12 +2056,13 @@ void __init rtnetlink_init(void)
2019 netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV); 2056 netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV);
2020 register_netdevice_notifier(&rtnetlink_dev_notifier); 2057 register_netdevice_notifier(&rtnetlink_dev_notifier);
2021 2058
2022 rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink, rtnl_dump_ifinfo); 2059 rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink,
2023 rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL); 2060 rtnl_dump_ifinfo, rtnl_calcit);
2024 rtnl_register(PF_UNSPEC, RTM_NEWLINK, rtnl_newlink, NULL); 2061 rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL, NULL);
2025 rtnl_register(PF_UNSPEC, RTM_DELLINK, rtnl_dellink, NULL); 2062 rtnl_register(PF_UNSPEC, RTM_NEWLINK, rtnl_newlink, NULL, NULL);
2063 rtnl_register(PF_UNSPEC, RTM_DELLINK, rtnl_dellink, NULL, NULL);
2026 2064
2027 rtnl_register(PF_UNSPEC, RTM_GETADDR, NULL, rtnl_dump_all); 2065 rtnl_register(PF_UNSPEC, RTM_GETADDR, NULL, rtnl_dump_all, NULL);
2028 rtnl_register(PF_UNSPEC, RTM_GETROUTE, NULL, rtnl_dump_all); 2066 rtnl_register(PF_UNSPEC, RTM_GETROUTE, NULL, rtnl_dump_all, NULL);
2029} 2067}
2030 2068
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 3609eacaf4ce..ed1bb8c65a9e 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1819,8 +1819,8 @@ static int __init dcbnl_init(void)
1819{ 1819{
1820 INIT_LIST_HEAD(&dcb_app_list); 1820 INIT_LIST_HEAD(&dcb_app_list);
1821 1821
1822 rtnl_register(PF_UNSPEC, RTM_GETDCB, dcb_doit, NULL); 1822 rtnl_register(PF_UNSPEC, RTM_GETDCB, dcb_doit, NULL, NULL);
1823 rtnl_register(PF_UNSPEC, RTM_SETDCB, dcb_doit, NULL); 1823 rtnl_register(PF_UNSPEC, RTM_SETDCB, dcb_doit, NULL, NULL);
1824 1824
1825 return 0; 1825 return 0;
1826} 1826}
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index cf26ac74a188..3780fd6e7bfe 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1414,9 +1414,9 @@ void __init dn_dev_init(void)
1414 1414
1415 dn_dev_devices_on(); 1415 dn_dev_devices_on();
1416 1416
1417 rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL); 1417 rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL, NULL);
1418 rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL); 1418 rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL, NULL);
1419 rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr); 1419 rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr, NULL);
1420 1420
1421 proc_net_fops_create(&init_net, "decnet_dev", S_IRUGO, &dn_dev_seq_fops); 1421 proc_net_fops_create(&init_net, "decnet_dev", S_IRUGO, &dn_dev_seq_fops);
1422 1422
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 1c74ed36ce8f..104324d6d535 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -763,8 +763,8 @@ void __init dn_fib_init(void)
763 763
764 register_dnaddr_notifier(&dn_fib_dnaddr_notifier); 764 register_dnaddr_notifier(&dn_fib_dnaddr_notifier);
765 765
766 rtnl_register(PF_DECnet, RTM_NEWROUTE, dn_fib_rtm_newroute, NULL); 766 rtnl_register(PF_DECnet, RTM_NEWROUTE, dn_fib_rtm_newroute, NULL, NULL);
767 rtnl_register(PF_DECnet, RTM_DELROUTE, dn_fib_rtm_delroute, NULL); 767 rtnl_register(PF_DECnet, RTM_DELROUTE, dn_fib_rtm_delroute, NULL, NULL);
768} 768}
769 769
770 770
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 74544bc6fdec..2949ca474ede 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1841,10 +1841,11 @@ void __init dn_route_init(void)
1841 proc_net_fops_create(&init_net, "decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops); 1841 proc_net_fops_create(&init_net, "decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops);
1842 1842
1843#ifdef CONFIG_DECNET_ROUTER 1843#ifdef CONFIG_DECNET_ROUTER
1844 rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, dn_fib_dump); 1844 rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute,
1845 dn_fib_dump, NULL);
1845#else 1846#else
1846 rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, 1847 rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute,
1847 dn_cache_dump); 1848 dn_cache_dump, NULL);
1848#endif 1849#endif
1849} 1850}
1850 1851
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 0d4a184af16f..37b3c188d8b3 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1833,8 +1833,8 @@ void __init devinet_init(void)
1833 1833
1834 rtnl_af_register(&inet_af_ops); 1834 rtnl_af_register(&inet_af_ops);
1835 1835
1836 rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL); 1836 rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL, NULL);
1837 rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL); 1837 rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL, NULL);
1838 rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr); 1838 rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr, NULL);
1839} 1839}
1840 1840
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 22524716fe70..92fc5f69f5da 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1124,9 +1124,9 @@ static struct pernet_operations fib_net_ops = {
1124 1124
1125void __init ip_fib_init(void) 1125void __init ip_fib_init(void)
1126{ 1126{
1127 rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL); 1127 rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL, NULL);
1128 rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL); 1128 rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL, NULL);
1129 rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib); 1129 rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib, NULL);
1130 1130
1131 register_pernet_subsys(&fib_net_ops); 1131 register_pernet_subsys(&fib_net_ops);
1132 register_netdevice_notifier(&fib_netdev_notifier); 1132 register_netdevice_notifier(&fib_netdev_notifier);
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 6ffe94ca5bc9..5ff47656fced 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -871,7 +871,7 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
871 } 871 }
872 872
873 return netlink_dump_start(idiagnl, skb, nlh, 873 return netlink_dump_start(idiagnl, skb, nlh,
874 inet_diag_dump, NULL); 874 inet_diag_dump, NULL, 0);
875 } 875 }
876 876
877 return inet_diag_get_exact(skb, nlh); 877 return inet_diag_get_exact(skb, nlh);
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 30a7763c400e..aae2bd8cd924 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -2544,7 +2544,8 @@ int __init ip_mr_init(void)
2544 goto add_proto_fail; 2544 goto add_proto_fail;
2545 } 2545 }
2546#endif 2546#endif
2547 rtnl_register(RTNL_FAMILY_IPMR, RTM_GETROUTE, NULL, ipmr_rtm_dumproute); 2547 rtnl_register(RTNL_FAMILY_IPMR, RTM_GETROUTE,
2548 NULL, ipmr_rtm_dumproute, NULL);
2548 return 0; 2549 return 0;
2549 2550
2550#ifdef CONFIG_IP_PIMSM_V2 2551#ifdef CONFIG_IP_PIMSM_V2
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 52b0b956508b..aa29c6291353 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3295,7 +3295,7 @@ int __init ip_rt_init(void)
3295 xfrm_init(); 3295 xfrm_init();
3296 xfrm4_init(ip_rt_max_size); 3296 xfrm4_init(ip_rt_max_size);
3297#endif 3297#endif
3298 rtnl_register(PF_INET, RTM_GETROUTE, inet_rtm_getroute, NULL); 3298 rtnl_register(PF_INET, RTM_GETROUTE, inet_rtm_getroute, NULL, NULL);
3299 3299
3300#ifdef CONFIG_SYSCTL 3300#ifdef CONFIG_SYSCTL
3301 register_pernet_subsys(&sysctl_route_ops); 3301 register_pernet_subsys(&sysctl_route_ops);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 3e369425df58..05838c7fcf64 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4727,16 +4727,20 @@ int __init addrconf_init(void)
4727 if (err < 0) 4727 if (err < 0)
4728 goto errout_af; 4728 goto errout_af;
4729 4729
4730 err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo); 4730 err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo,
4731 NULL);
4731 if (err < 0) 4732 if (err < 0)
4732 goto errout; 4733 goto errout;
4733 4734
4734 /* Only the first call to __rtnl_register can fail */ 4735 /* Only the first call to __rtnl_register can fail */
4735 __rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL); 4736 __rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL, NULL);
4736 __rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL); 4737 __rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL, NULL);
4737 __rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr, inet6_dump_ifaddr); 4738 __rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr,
4738 __rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL, inet6_dump_ifmcaddr); 4739 inet6_dump_ifaddr, NULL);
4739 __rtnl_register(PF_INET6, RTM_GETANYCAST, NULL, inet6_dump_ifacaddr); 4740 __rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL,
4741 inet6_dump_ifmcaddr, NULL);
4742 __rtnl_register(PF_INET6, RTM_GETANYCAST, NULL,
4743 inet6_dump_ifacaddr, NULL);
4740 4744
4741 ipv6_addr_label_rtnl_register(); 4745 ipv6_addr_label_rtnl_register();
4742 4746
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index c8993e5a337c..2d8ddba9ee58 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -592,8 +592,11 @@ out:
592 592
593void __init ipv6_addr_label_rtnl_register(void) 593void __init ipv6_addr_label_rtnl_register(void)
594{ 594{
595 __rtnl_register(PF_INET6, RTM_NEWADDRLABEL, ip6addrlbl_newdel, NULL); 595 __rtnl_register(PF_INET6, RTM_NEWADDRLABEL, ip6addrlbl_newdel,
596 __rtnl_register(PF_INET6, RTM_DELADDRLABEL, ip6addrlbl_newdel, NULL); 596 NULL, NULL);
597 __rtnl_register(PF_INET6, RTM_GETADDRLABEL, ip6addrlbl_get, ip6addrlbl_dump); 597 __rtnl_register(PF_INET6, RTM_DELADDRLABEL, ip6addrlbl_newdel,
598 NULL, NULL);
599 __rtnl_register(PF_INET6, RTM_GETADDRLABEL, ip6addrlbl_get,
600 ip6addrlbl_dump, NULL);
598} 601}
599 602
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 4076a0b14b20..3030bdfd3ca4 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1586,7 +1586,8 @@ int __init fib6_init(void)
1586 if (ret) 1586 if (ret)
1587 goto out_kmem_cache_create; 1587 goto out_kmem_cache_create;
1588 1588
1589 ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); 1589 ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib,
1590 NULL);
1590 if (ret) 1591 if (ret)
1591 goto out_unregister_subsys; 1592 goto out_unregister_subsys;
1592out: 1593out:
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 82a809901f8e..705c82886281 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1354,7 +1354,8 @@ int __init ip6_mr_init(void)
1354 goto add_proto_fail; 1354 goto add_proto_fail;
1355 } 1355 }
1356#endif 1356#endif
1357 rtnl_register(RTNL_FAMILY_IP6MR, RTM_GETROUTE, NULL, ip6mr_rtm_dumproute); 1357 rtnl_register(RTNL_FAMILY_IP6MR, RTM_GETROUTE, NULL,
1358 ip6mr_rtm_dumproute, NULL);
1358 return 0; 1359 return 0;
1359#ifdef CONFIG_IPV6_PIMSM_V2 1360#ifdef CONFIG_IPV6_PIMSM_V2
1360add_proto_fail: 1361add_proto_fail:
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index de2b1decd786..216ff31a0cc9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2925,9 +2925,9 @@ int __init ip6_route_init(void)
2925 goto xfrm6_init; 2925 goto xfrm6_init;
2926 2926
2927 ret = -ENOBUFS; 2927 ret = -ENOBUFS;
2928 if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL) || 2928 if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) ||
2929 __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL) || 2929 __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) ||
2930 __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL)) 2930 __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL))
2931 goto fib6_rules_init; 2931 goto fib6_rules_init;
2932 2932
2933 ret = register_netdevice_notifier(&ip6_route_dev_notifier); 2933 ret = register_netdevice_notifier(&ip6_route_dev_notifier);
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index 8041befc6555..333b0bedf298 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -1120,7 +1120,7 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
1120 1120
1121 return netlink_dump_start(ctnl, skb, nlh, 1121 return netlink_dump_start(ctnl, skb, nlh,
1122 ip_set_dump_start, 1122 ip_set_dump_start,
1123 ip_set_dump_done); 1123 ip_set_dump_done, 0);
1124} 1124}
1125 1125
1126/* Add, del and test */ 1126/* Add, del and test */
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 482e90c61850..7dec88a1755b 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -970,7 +970,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
970 970
971 if (nlh->nlmsg_flags & NLM_F_DUMP) 971 if (nlh->nlmsg_flags & NLM_F_DUMP)
972 return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table, 972 return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table,
973 ctnetlink_done); 973 ctnetlink_done, 0);
974 974
975 err = ctnetlink_parse_zone(cda[CTA_ZONE], &zone); 975 err = ctnetlink_parse_zone(cda[CTA_ZONE], &zone);
976 if (err < 0) 976 if (err < 0)
@@ -1840,7 +1840,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
1840 if (nlh->nlmsg_flags & NLM_F_DUMP) { 1840 if (nlh->nlmsg_flags & NLM_F_DUMP) {
1841 return netlink_dump_start(ctnl, skb, nlh, 1841 return netlink_dump_start(ctnl, skb, nlh,
1842 ctnetlink_exp_dump_table, 1842 ctnetlink_exp_dump_table,
1843 ctnetlink_exp_done); 1843 ctnetlink_exp_done, 0);
1844 } 1844 }
1845 1845
1846 err = ctnetlink_parse_zone(cda[CTA_EXPECT_ZONE], &zone); 1846 err = ctnetlink_parse_zone(cda[CTA_EXPECT_ZONE], &zone);
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 6ef64adf7362..0b92f75491b1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1659,13 +1659,10 @@ static int netlink_dump(struct sock *sk)
1659{ 1659{
1660 struct netlink_sock *nlk = nlk_sk(sk); 1660 struct netlink_sock *nlk = nlk_sk(sk);
1661 struct netlink_callback *cb; 1661 struct netlink_callback *cb;
1662 struct sk_buff *skb; 1662 struct sk_buff *skb = NULL;
1663 struct nlmsghdr *nlh; 1663 struct nlmsghdr *nlh;
1664 int len, err = -ENOBUFS; 1664 int len, err = -ENOBUFS;
1665 1665 int alloc_size;
1666 skb = sock_rmalloc(sk, NLMSG_GOODSIZE, 0, GFP_KERNEL);
1667 if (!skb)
1668 goto errout;
1669 1666
1670 mutex_lock(nlk->cb_mutex); 1667 mutex_lock(nlk->cb_mutex);
1671 1668
@@ -1675,6 +1672,12 @@ static int netlink_dump(struct sock *sk)
1675 goto errout_skb; 1672 goto errout_skb;
1676 } 1673 }
1677 1674
1675 alloc_size = max_t(int, cb->min_dump_alloc, NLMSG_GOODSIZE);
1676
1677 skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL);
1678 if (!skb)
1679 goto errout;
1680
1678 len = cb->dump(skb, cb); 1681 len = cb->dump(skb, cb);
1679 1682
1680 if (len > 0) { 1683 if (len > 0) {
@@ -1721,7 +1724,8 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
1721 const struct nlmsghdr *nlh, 1724 const struct nlmsghdr *nlh,
1722 int (*dump)(struct sk_buff *skb, 1725 int (*dump)(struct sk_buff *skb,
1723 struct netlink_callback *), 1726 struct netlink_callback *),
1724 int (*done)(struct netlink_callback *)) 1727 int (*done)(struct netlink_callback *),
1728 u16 min_dump_alloc)
1725{ 1729{
1726 struct netlink_callback *cb; 1730 struct netlink_callback *cb;
1727 struct sock *sk; 1731 struct sock *sk;
@@ -1735,6 +1739,7 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
1735 cb->dump = dump; 1739 cb->dump = dump;
1736 cb->done = done; 1740 cb->done = done;
1737 cb->nlh = nlh; 1741 cb->nlh = nlh;
1742 cb->min_dump_alloc = min_dump_alloc;
1738 atomic_inc(&skb->users); 1743 atomic_inc(&skb->users);
1739 cb->skb = skb; 1744 cb->skb = skb;
1740 1745
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 1781d99145e2..482fa571b4ee 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -525,7 +525,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
525 525
526 genl_unlock(); 526 genl_unlock();
527 err = netlink_dump_start(net->genl_sock, skb, nlh, 527 err = netlink_dump_start(net->genl_sock, skb, nlh,
528 ops->dumpit, ops->done); 528 ops->dumpit, ops->done, 0);
529 genl_lock(); 529 genl_lock();
530 return err; 530 return err;
531 } 531 }
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c
index 438accb7a5a8..d61f6761777d 100644
--- a/net/phonet/pn_netlink.c
+++ b/net/phonet/pn_netlink.c
@@ -289,15 +289,16 @@ out:
289 289
290int __init phonet_netlink_register(void) 290int __init phonet_netlink_register(void)
291{ 291{
292 int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit, NULL); 292 int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit,
293 NULL, NULL);
293 if (err) 294 if (err)
294 return err; 295 return err;
295 296
296 /* Further __rtnl_register() cannot fail */ 297 /* Further __rtnl_register() cannot fail */
297 __rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL); 298 __rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL, NULL);
298 __rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit); 299 __rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit, NULL);
299 __rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL); 300 __rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL, NULL);
300 __rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL); 301 __rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL, NULL);
301 __rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit); 302 __rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit, NULL);
302 return 0; 303 return 0;
303} 304}
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index a606025814a1..2f64262ab5d2 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1115,9 +1115,10 @@ nlmsg_failure:
1115 1115
1116static int __init tc_action_init(void) 1116static int __init tc_action_init(void)
1117{ 1117{
1118 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL); 1118 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL, NULL);
1119 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL); 1119 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL, NULL);
1120 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action); 1120 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action,
1121 NULL);
1121 1122
1122 return 0; 1123 return 0;
1123} 1124}
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index bb2c523f8158..9563887f219f 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -610,10 +610,10 @@ EXPORT_SYMBOL(tcf_exts_dump_stats);
610 610
611static int __init tc_filter_init(void) 611static int __init tc_filter_init(void)
612{ 612{
613 rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL); 613 rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL, NULL);
614 rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL); 614 rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL, NULL);
615 rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter, 615 rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter,
616 tc_dump_tfilter); 616 tc_dump_tfilter, NULL);
617 617
618 return 0; 618 return 0;
619} 619}
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6b8627661c98..8182aefafb02 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1792,12 +1792,12 @@ static int __init pktsched_init(void)
1792 register_qdisc(&pfifo_head_drop_qdisc_ops); 1792 register_qdisc(&pfifo_head_drop_qdisc_ops);
1793 register_qdisc(&mq_qdisc_ops); 1793 register_qdisc(&mq_qdisc_ops);
1794 1794
1795 rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL); 1795 rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL, NULL);
1796 rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL); 1796 rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL, NULL);
1797 rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc); 1797 rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc, NULL);
1798 rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL); 1798 rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL, NULL);
1799 rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL); 1799 rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL, NULL);
1800 rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass); 1800 rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass, NULL);
1801 1801
1802 return 0; 1802 return 0;
1803} 1803}
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index c658cb3bc7c3..0256b8a0a7cf 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2299,7 +2299,8 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
2299 if (link->dump == NULL) 2299 if (link->dump == NULL)
2300 return -EINVAL; 2300 return -EINVAL;
2301 2301
2302 return netlink_dump_start(net->xfrm.nlsk, skb, nlh, link->dump, link->done); 2302 return netlink_dump_start(net->xfrm.nlsk, skb, nlh,
2303 link->dump, link->done, 0);
2303 } 2304 }
2304 2305
2305 err = nlmsg_parse(nlh, xfrm_msg_min[type], attrs, XFRMA_MAX, 2306 err = nlmsg_parse(nlh, xfrm_msg_min[type], attrs, XFRMA_MAX,