MCPcopy Create free account
hub / github.com/F-Stack/f-stack / msg_prison_cleanup

Function msg_prison_cleanup

freebsd/kern/sysv_msg.c:1655–1670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1653}
1654
1655static void
1656msg_prison_cleanup(struct prison *pr)
1657{
1658 struct msqid_kernel *msqkptr;
1659 int i;
1660
1661 /* Remove any msqs that belong to this jail. */
1662 mtx_lock(&msq_mtx);
1663 for (i = 0; i < msginfo.msgmni; i++) {
1664 msqkptr = &msqids[i];
1665 if (msqkptr->u.msg_qbytes != 0 &&
1666 msqkptr->cred != NULL && msqkptr->cred->cr_prison == pr)
1667 msq_remove(msqkptr);
1668 }
1669 mtx_unlock(&msq_mtx);
1670}
1671
1672SYSCTL_JAIL_PARAM_SYS_NODE(sysvmsg, CTLFLAG_RW, "SYSV message queues");
1673

Callers 2

msg_prison_setFunction · 0.85
msg_prison_removeFunction · 0.85

Calls 3

msq_removeFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected