On Fri, May 25, 2012 at 03:38:04PM +0100, Will Deacon wrote:
> From: Dima Zavin <[email protected]>
> 
> commit 435a7ef52db7d86e67a009b36cac1457f8972391 upstream
> 
> 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)]
> 
> Cc: <[email protected]> # 2.6.32+: 4542b6a0: ARM: 7365/1
> Cc: <[email protected]> # 2.6.32+
> Acked-by: Catalin Marinas <[email protected]>
> Signed-off-by: Dima Zavin <[email protected]>
> Signed-off-by: John Stultz <[email protected]>
> Signed-off-by: Will Deacon <[email protected]>
> Signed-off-by: Russell King <[email protected]>
> ---
> 
> Greg: This patch is a candidate for -stable, but its dependency (listed
>       above) wasn't marked as such, hence this retrospective submission.

Both now queued up for 3.0, 3.3, and 3.4-stable trees

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to