summaryrefslogtreecommitdiff
path: root/ipc/msg.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-03-24 07:41:55 +0300
committerEric W. Biederman <ebiederm@xmission.com>2018-03-27 23:53:56 +0300
commit50ab44b1c5d1b13305ce8acb74c8e50e0dcbaedc (patch)
treea26481edc4510e3a92c7993e1567e56d8d71a1da /ipc/msg.c
parent51d6f2635b39709ee5e62479be23d423b760292c (diff)
downloadlinux-50ab44b1c5d1b13305ce8acb74c8e50e0dcbaedc.tar.xz
ipc: Directly call the security hook in ipc_ops.associate
After the last round of cleanups the shm, sem, and msg associate operations just became trivial wrappers around the appropriate security method. Simplify things further by just calling the security method directly. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 825ad585a6ff..d667dd8e97ab 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -272,20 +272,12 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
ipc_rcu_putref(&msq->q_perm, msg_rcu_free);
}
-/*
- * Called with msg_ids.rwsem and ipcp locked.
- */
-static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
-{
- return security_msg_queue_associate(ipcp, msgflg);
-}
-
SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg)
{
struct ipc_namespace *ns;
static const struct ipc_ops msg_ops = {
.getnew = newque,
- .associate = msg_security,
+ .associate = security_msg_queue_associate,
};
struct ipc_params msg_params;