diff options
author | Todd Poynor <[email protected]> | 2014-02-04 16:08:37 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-02-07 09:03:16 -0800 |
commit | 077f6db9731673753ca41a5c3acbb5ead142658a (patch) | |
tree | 4846028c95f948bd89be3437e9005af5e2c668e3 /lib/mpi/mpi-cmp.c | |
parent | 5cf045f54d31894ec59ee741e01fa258be2ba0fb (diff) |
staging: 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.
Cc: Colin Cross <[email protected]>
Cc: Android Kernel Team <[email protected]>
Signed-off-by: Todd Poynor <[email protected]>
[jstultz: minor commit message tweaks]
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions