Thread (14 messages) flat view 14 messages, 3 authors, 2012-07-22
STALE5167d

[PATCH] ARM: mm: avoid attempting to flush the gate_vma with VIVT caches

From: Will Deacon <hidden>
Date: 2012-07-19 16:37:12

On Thu, Jul 19, 2012 at 02:03:50PM +0100, Uros Bizjak wrote:
On Thu, Jul 19, 2012 at 2:28 PM, Will Deacon [off-list ref] wrote:
quoted
On Mon, Jul 16, 2012 at 05:23:46PM +0100, Will Deacon wrote:
quoted
The vivt_flush_cache_{range,page} functions check that the mm_struct
of the VMA being flushed has been active on the current CPU before
performing the cache maintenance.

The gate_vma has a NULL mm_struct pointer and, as such, will cause a
kernel fault if we try to flush it with the above operations. This
happens during ELF core dumps, which include the gate_vma as it may be
useful for debugging purposes.

This patch adds checks to the VIVT cache flushing functions so that VMAs
with a NULL mm_struct are ignored.
Would one of you be able to test this patch please? I've not managed to
trigger the bug you reported on my boards, so it would be useful to know
whether or not this patch solves the problem for you.
Patched kernel works as expected. Also, backport to 3.4 (where
original problem was triggered) works OK, so I'd suggest to backport
this patch to 3.4.

Tested-by: Uros Bizjak <redacted>
Thanks Uros, I'll add that and CC stable on the patch too.

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help