Ashmem: avoid deadlock between read and mmap calls