summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@austin.ibm.com>2005-02-22 21:56:33 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-22 21:56:33 -0800
commitf5f23ec8d572816c7ff9c6e5eb0c209c9faa008e (patch)
tree712e954707a12a2e3ce04d58307d1f2f69fac294 /net/unix/af_unix.c
parente24c22adf21a30354bd360fd5dcfc1a38e38cbdf (diff)
[PATCH] Fix possible futex mmap_sem deadlock
Some futex functions do get_user calls while holding mmap_sem for reading. If get_user() faults, and another thread happens to be in mmap (or somewhere else holding waiting on down_write for the same semaphore), then do_page_fault will deadlock. Most architectures seem to be exposed to this. To avoid it, make sure the page is available. If not, release the semaphore, fault it in and retry. I also found another exposure by inspection, moving some of the code around avoids the possible deadlock there. Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions