aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-20 17:14:21 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:03 -0400
commitaf65bdfce98d7965fbe93a48b8128444a2eea024 (patch)
treee6ac5ff82a0d5067213135cdf049b912b02e824d /include
parentb076deb8498e26c9aa2f44046fe5e9936ae2fb5a (diff)
[NETLINK]: Switch cb_lock spinlock to mutex and allow to override it
Switch cb_lock to mutex and allow netlink kernel users to override it with a subsystem specific mutex for consistent locking in dump callbacks. All netlink_dump_start users have been audited not to rely on any side-effects of the previously used spinlock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netlink.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 0d11f6a7389c..f41688f56632 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -157,7 +157,10 @@ struct netlink_skb_parms
157#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) 157#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
158 158
159 159
160extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module); 160extern struct sock *netlink_kernel_create(int unit, unsigned int groups,
161 void (*input)(struct sock *sk, int len),
162 struct mutex *cb_mutex,
163 struct module *module);
161extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); 164extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
162extern int netlink_has_listeners(struct sock *sk, unsigned int group); 165extern int netlink_has_listeners(struct sock *sk, unsigned int group);
163extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); 166extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);