mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
[NETLINK]: allocate group bitmaps dynamically
Allow changing the number of groups for a netlink family after it has been created, use RCU to protect the listeners bitmap keeping netlink_has_listeners() lock-free. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Patrick McHardy <kaber@trash.net> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c81de6addb
commit
b4ff4f0419
2 changed files with 83 additions and 24 deletions
|
@ -161,6 +161,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups,
|
|||
void (*input)(struct sock *sk, int len),
|
||||
struct mutex *cb_mutex,
|
||||
struct module *module);
|
||||
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
|
||||
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
|
||||
extern int netlink_has_listeners(struct sock *sk, unsigned int group);
|
||||
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue