ashmem: avoid deadlock between read and mmap calls

Avoid holding ashmem_mutex across code that can page fault.  Page faults
grab the mmap_sem for the process, which are also held by mmap calls
prior to calling ashmem_mmap, which locks ashmem_mutex.  The reversed
order of locking between the two can deadlock.

The calls that can page fault are read() and the ASHMEM_SET_NAME and
ASHMEM_GET_NAME ioctls.  Move the code that accesses userspace pages
outside the ashmem_mutex.

Bug: 9261835
Change-Id: If1322e981d29c889a56cdc9dfcbc6df2729a45e9
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Squashed update of kernel from 3.4.47 to 3.4.48
Fix problems of the squashed update to 3.4.48 kernel version
by reverting "mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas"

This reverts commit:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=c8a097fd8d73584d7c1577e0aee41c2a177394f7

The changes made by this commit caused kernel panics while performing
memory operations with subsequent hangs, reboots or shutdowns.