From: Dima Zavin Date: Mon, 30 Apr 2012 09:26:14 +0000 (+0100) Subject: ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held X-Git-Tag: v3.5-rc1~182^2~1^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=435a7ef52db7d86e67a009b36cac1457f8972391;p=pandora-kernel.git ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held We can't be holding the mmap_sem while calling flush_cache_user_range because the flush can fault. If we fault on a user address, the page fault handler will try to take mmap_sem again. Since both places acquire the read lock, most of the time it succeeds. However, if another thread tries to acquire the write lock on the mmap_sem (e.g. mmap) in between the call to flush_cache_user_range and the fault, the down_read in do_page_fault will deadlock. [will: removed drop of vma parameter as already queued by rmk (7365/1)] Acked-by: Catalin Marinas Signed-off-by: Dima Zavin Signed-off-by: John Stultz Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed