summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2007-03-29 01:20:38 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-29 08:22:26 -0700
commit90ed52ebe48181d3c5427b3bd1d24f659e7575ad (patch)
treebfb735ab12ebe7964714c637bcb64163646cd347 /usr
parent16a100190d39592d1d56ff5a0b978b20288c3427 (diff)
downloadop-kernel-dev-90ed52ebe48181d3c5427b3bd1d24f659e7575ad.zip
op-kernel-dev-90ed52ebe48181d3c5427b3bd1d24f659e7575ad.tar.gz
[PATCH] holepunch: fix mmap_sem i_mutex deadlock
sys_madvise has down_write of mmap_sem, then madvise_remove calls vmtruncate_range which takes i_mutex and i_alloc_sem: no, we can easily devise deadlocks from that ordering. madvise_remove drop mmap_sem while calling vmtruncate_range: luckily, since madvise_remove doesn't split or merge vmas, it's easy to handle this case with a NULL prev, without restructuring sys_madvise. (Though sad to retake mmap_sem when it's unlikely to be needed, and certainly down_read is sufficient for MADV_REMOVE, unlike the other madvices.) Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Miklos Szeredi <mszeredi@suse.cz> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud