diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-20 17:14:21 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:29:03 -0400 |
commit | af65bdfce98d7965fbe93a48b8128444a2eea024 (patch) | |
tree | e6ac5ff82a0d5067213135cdf049b912b02e824d /include | |
parent | b076deb8498e26c9aa2f44046fe5e9936ae2fb5a (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.h | 5 |
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 | ||
160 | extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module); | 160 | extern 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); | ||
161 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 164 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
162 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); | 165 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); |
163 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 166 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |