HomeFreeBSD

unix/stream: fix wakeup race between pr_poll and pr_soreceive

Description

unix/stream: fix wakeup race between pr_poll and pr_soreceive

Both selrecord(9) and UXST_PEER_SEL marking should happen under the
receive buffer lock. Otherwise, there is a race window, when a reading
thread would issue wakeup(9) before a polling thread have entered
sleep(9).

Reported by: cy
Fixes: d15792780760ef94647af9b377b5f0a80e1826bc

Details

Provenance
glebiusAuthored on May 7 2025, 3:32 PM
Parents
rGa130a604a4fb: rc.conf.5: document precious_machine
Branches
Unknown
Tags
Unknown