summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Alex Vakulenko <avakulenko@google.com> 2017-04-12 14:02:19 -0700
committer Alex Vakulenko <avakulenko@google.com> 2017-04-13 10:02:17 -0700
commitc0fd676fa087b38b63d253536c6fc9513a0470c8 (patch)
tree73bfbbfbe8933b0fc360fb52f98e57d793297aab /libs/gui/BufferQueue.cpp
parentd3ef230cac44b4d225c277d2fcfe59ba79dc9b65 (diff)
libpdx_uds: Handle EACCES error when connecting to PDX service
There is a race condition in the way init process creates socket files before it forks into a child (see system/core/init/util.cpp, function create_socket()). It first creates a socket, then calls bind() which creates a file entry, then calls chown/chmod to change ownership and access permissions of that file object. If a client process connects to the socket just after bind() was called but before chmod(), the socket file will have incorrect permissions and the connect call will be aborted with EACCESS (Permission denied) error. We should retry connection in case we get EACCESS. A proper fix would be is to find a way for init to create the file entry with the proper permissions to start with, and eliminate the race condition altogether. Bug: 37171113 Test: `lunch sailfish-eng && m -j32` succeeds Device boots correctly. Error recovery is handled correctly even after adding sleep(5) to init process just before calling chmod on the socket. Change-Id: If97c316daa0c0be5ff7b5aa302a69aa60e9fb237
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions