projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETLINK]: Encapsulate eff_cap usage within security framework.
[deliverable/linux.git]
/
net
/
netlink
/
genetlink.c
diff --git
a/net/netlink/genetlink.c
b/net/netlink/genetlink.c
index 43e72419c868b38d660fef2a89519bd9898f2a64..edf084becd5ecafccb25a99ddc0c8cd997336125 100644
(file)
--- a/
net/netlink/genetlink.c
+++ b/
net/netlink/genetlink.c
@@
-13,26
+13,27
@@
#include <linux/socket.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
#include <linux/string.h>
#include <linux/skbuff.h>
+#include <linux/mutex.h>
#include <net/sock.h>
#include <net/genetlink.h>
struct sock *genl_sock = NULL;
#include <net/sock.h>
#include <net/genetlink.h>
struct sock *genl_sock = NULL;
-static DE
CLARE_MUTEX(genl_sem
); /* serialization of message processing */
+static DE
FINE_MUTEX(genl_mutex
); /* serialization of message processing */
static void genl_lock(void)
{
static void genl_lock(void)
{
-
down(&genl_sem
);
+
mutex_lock(&genl_mutex
);
}
static int genl_trylock(void)
{
}
static int genl_trylock(void)
{
- return
down_trylock(&genl_sem
);
+ return
!mutex_trylock(&genl_mutex
);
}
static void genl_unlock(void)
{
}
static void genl_unlock(void)
{
-
up(&genl_sem
);
+
mutex_unlock(&genl_mutex
);
if (genl_sock && genl_sock->sk_receive_queue.qlen)
genl_sock->sk_data_ready(genl_sock, 0);
if (genl_sock && genl_sock->sk_receive_queue.qlen)
genl_sock->sk_data_ready(genl_sock, 0);
@@
-319,7
+320,7
@@
static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
goto errout;
}
goto errout;
}
- if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb)) {
+ if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb
, CAP_NET_ADMIN
)) {
err = -EPERM;
goto errout;
}
err = -EPERM;
goto errout;
}
This page took
0.025667 seconds
and
5
git commands to generate.