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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 47e791738014..e259f46e26f7 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1204,7 +1204,9 @@ static void netlink_data_ready(struct sock *sk, int len)
1204 */ 1204 */
1205 1205
1206struct sock * 1206struct sock *
1207netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len), struct module *module) 1207netlink_kernel_create(int unit, unsigned int groups,
1208 void (*input)(struct sock *sk, int len),
1209 struct module *module)
1208{ 1210{
1209 struct socket *sock; 1211 struct socket *sock;
1210 struct sock *sk; 1212 struct sock *sk;
@@ -1234,7 +1236,7 @@ netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len), struct
1234 nlk->flags |= NETLINK_KERNEL_SOCKET; 1236 nlk->flags |= NETLINK_KERNEL_SOCKET;
1235 1237
1236 netlink_table_grab(); 1238 netlink_table_grab();
1237 nl_table[unit].groups = 32; 1239 nl_table[unit].groups = groups < 32 ? 32 : groups;
1238 nl_table[unit].module = module; 1240 nl_table[unit].module = module;
1239 nl_table[unit].registered = 1; 1241 nl_table[unit].registered = 1;
1240 netlink_table_ungrab(); 1242 netlink_table_ungrab();