Description[mojo-edk] Fix race in port closure
When we close a port we first collect any new ports
hanging around in its message queue. These ports have
been accepted on the node but not yet read by the
embedder, and they need to be closed to avoid leakage.
Previously we collected the ports, then released the
port/ports lock, then erased the closing port. That
left a window where a new message could be accepted
by the port on another thread and leak its ports.
This CL simply erases the closing port while still
holding locks, thus avoiding said race.
TBR=amistry@chromium.org
BUG=
Committed: https://crrev.com/bcdfd1be996817834a250fbf8595035fd48185ea
Cr-Commit-Position: refs/heads/master@{#393896}
Patch Set 1 #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 5 (2 generated)
|