aboutsummaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2014-02-04 19:08:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 12:03:16 -0500
commit077f6db9731673753ca41a5c3acbb5ead142658a (patch)
tree4846028c95f948bd89be3437e9005af5e2c668e3 /Kbuild
parent5cf045f54d31894ec59ee741e01fa258be2ba0fb (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 <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Todd Poynor <toddpoynor@google.com> [jstultz: minor commit message tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions