platform_system_core/libappfuse
Anton Hansson c9e873f274 Close /dev/fuse FD before calling onClosed
This works around a deadlock when a bridge that is about to be closed
is reused for a new call to openFile. The call to open() ends up holding
the vold lock, waiting for appfuse to respond. The appfuse event loop
calls onClosed(), which ends up calling vold.unmountAppFuse(), which
cannot get the lock.

Closing this file descriptor causes any current calls to open() on its
mount path to fail with either ECONNABORTED or ENOTCONN, allowing the
event loop to make progress, call onClosed() and unmount the path.

Note that the failed call to open() will result in a retry, which
will create a new appfuse bridge. This is not ideal but not a new
problem -- the common case here is that that each call to
openProxyFileDescriptor creates a new bridge. This should ideally
be improved.

Bug: 132344997
Test: flick through info of photos with location info attached
Exempt-From-Owner-Approval: verbal approval of approach
Change-Id: I878e5cf86f18c5233f8505f52eb9db076bd72d01
2019-05-31 15:58:45 +00:00
..
include/libappfuse Stop using SO_SNDBUFFORCE 2018-03-15 14:22:27 +09:00
tests Skip FUSE request from /dev/fuse if unique=0 2017-06-20 00:25:28 +00:00
Android.bp bpfmt. 2018-02-16 17:58:14 -08:00
AndroidTest.xml Add test config to libappfuse_test 2017-03-31 17:11:50 -07:00
EpollController.cc Add new EpollController class. 2017-03-15 15:58:06 +09:00
FuseAppLoop.cc Change FuseAppLoop so that it can process messages asynchronously. 2017-03-29 00:13:58 +00:00
FuseBridgeLoop.cc Close /dev/fuse FD before calling onClosed 2019-05-31 15:58:45 +00:00
FuseBuffer.cc Stop using SO_SNDBUFFORCE 2018-03-15 14:22:27 +09:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00