ashmem: avoid deadlock between read and mmap calls, original commit: 1da431a78e9a4f9dd3f448639334d24a294080ed