Fully initialize msqids[]. This could lead to ENOSPC and other strange

stuff.

PR: 21085
Submitted by:  Marcin Cieslak <saper@SYSTEM.PL>
This commit is contained in:
peter 2000-09-19 22:59:22 +00:00
parent fe1b76bd44
commit e603b28167

View File

@ -188,6 +188,7 @@ msginit(dummy)
for (i = 0; i < msginfo.msgmni; i++) {
msqids[i].msg_qbytes = 0; /* implies entry is available */
msqids[i].msg_perm.seq = 0; /* reset to a known value */
msqids[i].msg_perm.mode = 0;
}
}
SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL)