summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipc/msg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 7385de25788a..25f1a6139584 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -296,7 +296,9 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
}
atomic_sub(msq->q_cbytes, &ns->msg_bytes);
security_msg_queue_free(msq);
+ ipc_lock_by_ptr(&msq->q_perm);
ipc_rcu_putref(msq);
+ ipc_unlock(&msq->q_perm);
}
/*