aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@st.com>2008-09-05 16:17:15 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-09-08 10:35:04 +0900
commit96e14e54a6abd5a4bcd75e33962f87bef145d1f6 (patch)
tree4c7c60823e05872304812ce181822b1d2cc609e5 /arch/sh/mm
parent28d6e52cf7e881834d2dab370afa20b6223f726c (diff)
downloadkernel_samsung_espresso10-96e14e54a6abd5a4bcd75e33962f87bef145d1f6.zip
kernel_samsung_espresso10-96e14e54a6abd5a4bcd75e33962f87bef145d1f6.tar.gz
kernel_samsung_espresso10-96e14e54a6abd5a4bcd75e33962f87bef145d1f6.tar.bz2
sh: vmalloc pgtable sync fix.
This fixes a problem in the code which copies the vmalloc portion of the kernel's page table into the current user space page table. The addition of the four level page table code breaks on folded page tables, because the pud level is always present (although folded). This updates the code to use the same style of updates for the pud as is used for the pgd level. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/fault_32.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 0c776fd..e8efda9 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -61,7 +61,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
pgd = get_TTB() + offset;
pgd_k = swapper_pg_dir + offset;
- /* This will never happen with the folded page table. */
if (!pgd_present(*pgd)) {
if (!pgd_present(*pgd_k))
goto bad_area_nosemaphore;
@@ -71,9 +70,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
pud = pud_offset(pgd, address);
pud_k = pud_offset(pgd_k, address);
- if (pud_present(*pud) || !pud_present(*pud_k))
- goto bad_area_nosemaphore;
- set_pud(pud, *pud_k);
+
+ if (!pud_present(*pud)) {
+ if (!pud_present(*pud_k))
+ goto bad_area_nosemaphore;
+ set_pud(pud, *pud_k);
+ return;
+ }
pmd = pmd_offset(pud, address);
pmd_k = pmd_offset(pud_k, address);