summaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
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)
272 ipc_rcu_putref(&msq->q_perm, msg_rcu_free); 272 ipc_rcu_putref(&msq->q_perm, msg_rcu_free);
273} 273}
274 274
275/*
276 * Called with msg_ids.rwsem and ipcp locked.
277 */
278static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
279{
280 return security_msg_queue_associate(ipcp, msgflg);
281}
282
283SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg) 275SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg)
284{ 276{
285 struct ipc_namespace *ns; 277 struct ipc_namespace *ns;
286 static const struct ipc_ops msg_ops = { 278 static const struct ipc_ops msg_ops = {
287 .getnew = newque, 279 .getnew = newque,
288 .associate = msg_security, 280 .associate = security_msg_queue_associate,
289 }; 281 };
290 struct ipc_params msg_params; 282 struct ipc_params msg_params;
291 283