[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0707310831080.4116@mtfhpc.demon.co.uk>
Date: Tue, 31 Jul 2007 08:55:20 +0100 (BST)
From: Mark Fortescue <mark@...hpc.demon.co.uk>
To: David Miller <davem@...emloft.net>
cc: aaw@...gle.com, akpm@...ux-foundation.org,
linux-arch@...r.kernel.org, sparclinux@...r.kernel.org,
wli@...omorphy.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] Re: [SPARC32] NULL pointer derefference
Hi David,
I have formulated a patch that prevents the update_mmu_cache from doing
enything if there is no context available. This apears to have no
immediate, undesirable side effects.
This worked better than the alternative of setting up a context to work with.
Can you for see any issues in doing this?
If not, can you check+apply the attached (un-mangled) patch.
diff -ruNpd linux-2.6/arch/sparc/mm/sun4c.c linux-test/arch/sparc/mm/sun4c.c
--- linux-2.6/arch/sparc/mm/sun4c.c 2007-07-30 03:19:15.000000000 +0100
+++ linux-test/arch/sparc/mm/sun4c.c 2007-07-31 08:28:13.000000000 +0100
@@ -1999,6 +2029,9 @@ void sun4c_update_mmu_cache(struct vm_ar
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) {
Regards
Mark Fortescue.
View attachment "mmu-cache-fix.patch" of type "TEXT/PLAIN" (1184 bytes)
Powered by blists - more mailing lists