Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06628607 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETLINK]: Add "groups" argument to netlink_kernel_create

parent 9a4595bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,

	dev->groups = 1;
	dev->seq = 1;
	dev->nls = netlink_kernel_create(NETLINK_W1, NULL, THIS_MODULE);
	dev->nls = netlink_kernel_create(NETLINK_W1, 1, NULL, THIS_MODULE);
	if (!dev->nls) {
		printk(KERN_ERR "Failed to create new netlink socket(%u) for w1 master %s.\n",
			NETLINK_NFLOG, dev->dev.bus_id);
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ struct netlink_skb_parms
#define NETLINK_CREDS(skb)	(&NETLINK_CB((skb)).creds)


extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len), struct module *module);
extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module);
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ static int __init audit_init(void)
{
	printk(KERN_INFO "audit: initializing netlink socket (%s)\n",
	       audit_default ? "enabled" : "disabled");
	audit_sock = netlink_kernel_create(NETLINK_AUDIT, audit_receive,
	audit_sock = netlink_kernel_create(NETLINK_AUDIT, 0, audit_receive,
					   THIS_MODULE);
	if (!audit_sock)
		audit_panic("cannot initialize netlink socket");
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ EXPORT_SYMBOL_GPL(kobject_uevent_atomic);

static int __init kobject_uevent_init(void)
{
	uevent_sock = netlink_kernel_create(NETLINK_KOBJECT_UEVENT, NULL,
	uevent_sock = netlink_kernel_create(NETLINK_KOBJECT_UEVENT, 1, NULL,
					    THIS_MODULE);

	if (!uevent_sock) {
+2 −1
Original line number Diff line number Diff line
@@ -258,7 +258,8 @@ static int __init init(void)
		spin_lock_init(&ulog_buffers[i].lock);
	}

	ebtulognl = netlink_kernel_create(NETLINK_NFLOG, NULL, THIS_MODULE);
	ebtulognl = netlink_kernel_create(NETLINK_NFLOG, EBT_ULOG_MAXNLGROUPS,
	                                  NULL, THIS_MODULE);
	if (!ebtulognl)
		ret = -ENOMEM;
	else if ((ret = ebt_register_watcher(&ulog)))
Loading