aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c11
-rw-r--r--net/netlink/genetlink.c9
2 files changed, 11 insertions, 9 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 4d751e3d4b4b..ab74845876d2 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1736,10 +1736,7 @@ errout_skb:
1736 1736
1737int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, 1737int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
1738 const struct nlmsghdr *nlh, 1738 const struct nlmsghdr *nlh,
1739 int (*dump)(struct sk_buff *skb, 1739 struct netlink_dump_control *control)
1740 struct netlink_callback *),
1741 int (*done)(struct netlink_callback *),
1742 u16 min_dump_alloc)
1743{ 1740{
1744 struct netlink_callback *cb; 1741 struct netlink_callback *cb;
1745 struct sock *sk; 1742 struct sock *sk;
@@ -1750,10 +1747,10 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
1750 if (cb == NULL) 1747 if (cb == NULL)
1751 return -ENOBUFS; 1748 return -ENOBUFS;
1752 1749
1753 cb->dump = dump; 1750 cb->dump = control->dump;
1754 cb->done = done; 1751 cb->done = control->done;
1755 cb->nlh = nlh; 1752 cb->nlh = nlh;
1756 cb->min_dump_alloc = min_dump_alloc; 1753 cb->min_dump_alloc = control->min_dump_alloc;
1757 atomic_inc(&skb->users); 1754 atomic_inc(&skb->users);
1758 cb->skb = skb; 1755 cb->skb = skb;
1759 1756
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index a1154717219e..9f40441d7a7d 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -563,8 +563,13 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
563 return -EOPNOTSUPP; 563 return -EOPNOTSUPP;
564 564
565 genl_unlock(); 565 genl_unlock();
566 err = netlink_dump_start(net->genl_sock, skb, nlh, 566 {
567 ops->dumpit, ops->done, 0); 567 struct netlink_dump_control c = {
568 .dump = ops->dumpit,
569 .done = ops->done,
570 };
571 err = netlink_dump_start(net->genl_sock, skb, nlh, &c);
572 }
568 genl_lock(); 573 genl_lock();
569 return err; 574 return err;
570 } 575 }