Commit Graph
2 Commits
Author SHA1 Message Date
tablefrogpillowandClaude Opus 4.8 198bfe50f9 fix(libkernel_sys): guard the mqueue nonblocking flag, reject a null receive buffer and saturate the deadline
kmq_setattr wrote open->nonblocking outside queue.lock while WaitFor reads it
under the lock, racing concurrent mq_setattr with send and receive; the write
and the old-attribute snapshot now share the readers' lock.

kmq_timedreceive copied into buffer after dequeuing the message, so a null
buffer crashed the host and lost the message; it is now rejected with EFAULT
before the queue is touched, matching kmq_timedsend.

Deadline converted tv_sec to int64 nanoseconds, overflowing for a tv_sec near
INT64_MAX ("forever") and wrapping to an immediate timeout; it now saturates
to the clock's representable range.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-09 19:35:31 +00:00
David dfc5804e5f feat(libkernel_sys): implement POSIX message queues 2026-11-09 13:11:23 +00:00