diff options
author | Ian Gudger <igudger@google.com> | 2018-12-17 17:52:05 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-17 17:53:22 -0800 |
commit | 12c7430a01ad2b484987dd8ee24b6f2907e7366d (patch) | |
tree | 832c72f40867827b53bd357708c7cbdd3e6f6842 /test/syscalls/linux/link.cc | |
parent | b62591e6a813ec19a1fd74943584c4fead81f670 (diff) |
Fix recv blocking for connectionless Unix sockets.
Connectionless Unix sockets (DGRAM Unix sockets created with the socket system
call) inherently only have a read queue. They do not establish bidirectional
connections, instead, the connect system call only sets a default send
location. Writes give the data to the other endpoint which has its own read
queue.
To simplify the code, connectionless Unix sockets still get read and write
queues, but the write queue is a dummy and never waited on. The read queue is
the connectionless endpoint's queue. This change fixes a bug where the dummy
queue was incorrectly set as the read queue and the endpoint's queue was
incorrectly set as the write queue. This meant that read notifications went
to the dummy queue and were black holed.
PiperOrigin-RevId: 225921042
Change-Id: I8d9059def787a2c3c305185b92d05093fbd2be2a
Diffstat (limited to 'test/syscalls/linux/link.cc')
0 files changed, 0 insertions, 0 deletions