aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c8f35b5d2ee9..5fe4f3b04ed3 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1566,12 +1566,6 @@ netlink_kernel_release(struct sock *sk)
1566} 1566}
1567EXPORT_SYMBOL(netlink_kernel_release); 1567EXPORT_SYMBOL(netlink_kernel_release);
1568 1568
1569
1570static void listeners_free_rcu(struct rcu_head *head)
1571{
1572 kfree(container_of(head, struct listeners, rcu));
1573}
1574
1575int __netlink_change_ngroups(struct sock *sk, unsigned int groups) 1569int __netlink_change_ngroups(struct sock *sk, unsigned int groups)
1576{ 1570{
1577 struct listeners *new, *old; 1571 struct listeners *new, *old;
@@ -1588,7 +1582,7 @@ int __netlink_change_ngroups(struct sock *sk, unsigned int groups)
1588 memcpy(new->masks, old->masks, NLGRPSZ(tbl->groups)); 1582 memcpy(new->masks, old->masks, NLGRPSZ(tbl->groups));
1589 rcu_assign_pointer(tbl->listeners, new); 1583 rcu_assign_pointer(tbl->listeners, new);
1590 1584
1591 call_rcu(&old->rcu, listeners_free_rcu); 1585 kfree_rcu(old, rcu);
1592 } 1586 }
1593 tbl->groups = groups; 1587 tbl->groups = groups;
1594 1588