diff options
author | 2014-02-04 16:08:37 -0800 | |
---|---|---|
committer | 2014-02-07 09:03:16 -0800 | |
commit | 077f6db9731673753ca41a5c3acbb5ead142658a (patch) | |
tree | 4846028c95f948bd89be3437e9005af5e2c668e3 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | staging: sync: Fix a race condition between release_obj and print_obj (diff) | |
download | linux-dev-077f6db9731673753ca41a5c3acbb5ead142658a.tar.xz linux-dev-077f6db9731673753ca41a5c3acbb5ead142658a.zip |
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 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions