summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-06-04 17:29:38 -0700
committerArve Hjønnevåg <arve@android.com>2013-07-01 14:16:27 -0700
commit0a9dea28170c90a7265250b66cc0df1253b0c501 (patch)
treefbd0b5845d22f99fbf4cc9b1fef75fb4ec55f558 /android
parent81dce1aa81e0a20452845569ecb3fc796702f6b1 (diff)
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> Conflicts: drivers/staging/android/ashmem.c
Diffstat (limited to 'android')
0 files changed, 0 insertions, 0 deletions