o Clear a high bit of ipc_perm.seq so msgget(3) never returns a
negative message queue id. PR: kern/46122 Submitted by: Vladimir B.Grebenschikov <vova@sw.ru> MFC after: 2 weeks
This commit is contained in:
parent
04e30a1ce6
commit
9f59c468f3
@ -538,7 +538,7 @@ msgget(td, uap)
|
||||
msqptr->msg_perm.gid = cred->cr_gid;
|
||||
msqptr->msg_perm.mode = (msgflg & 0777);
|
||||
/* Make sure that the returned msqid is unique */
|
||||
msqptr->msg_perm.seq++;
|
||||
msqptr->msg_perm.seq = (msqptr->msg_perm.seq + 1) & 0x7fff;
|
||||
msqptr->msg_first = NULL;
|
||||
msqptr->msg_last = NULL;
|
||||
msqptr->msg_cbytes = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user