| 1653 | } |
| 1654 | |
| 1655 | static void |
| 1656 | msg_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 | |
| 1672 | SYSCTL_JAIL_PARAM_SYS_NODE(sysvmsg, CTLFLAG_RW, "SYSV message queues"); |
| 1673 |
no test coverage detected