From: Mark Fortescue Date: Tue, 31 Jul 2007 09:03:11 +0000 (-0700) Subject: [SPARC]: Fix exec failures on sun4c. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=da4e9fea85ea42c9c6ce163a85d5164efbec31a2;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git [SPARC]: Fix exec failures on sun4c. This deals with a sun4c issue caused by commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba: mm: variable length argument support. The new way the code works means that sun4c_update_mmu_cache gets called before a context has been selected, which results in invalid operation of the underling mm code. Simply ignoring update requests when there is no valid context solves the problem. Signed-off-by Mark Fortescue Signed-off-by: David S. Miller --- diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index a57a366e339a..79d60d86f6f8 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1999,6 +1999,9 @@ void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long address, p unsigned long flags; int pseg; + if (vma->vm_mm->context == NO_CONTEXT) + return; + local_irq_save(flags); address &= PAGE_MASK; if ((pseg = sun4c_get_segmap(address)) == invalid_segment) {