From fc2ad177b92ab62046b53f6a25332c02aa75249a Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Mon, 13 Jul 2009 11:38:04 +0000 Subject: [PATCH] --- yaml --- r: 163333 b: refs/heads/master c: 05dd2cd3bb3299540e33ff60c5b401dd88f273bd h: refs/heads/master i: 163331: fa14fbe77a8c3a8f554efb5cc1496404381ab2e8 v: v3 --- [refs] | 2 +- trunk/arch/sh/mm/fault_32.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e3d43a3d39de..707f13f3d810 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3e28ad7b2442e02c35c2fee2d85a90d0202a9aad +refs/heads/master: 05dd2cd3bb3299540e33ff60c5b401dd88f273bd diff --git a/trunk/arch/sh/mm/fault_32.c b/trunk/arch/sh/mm/fault_32.c index 08d0117d90fa..dbbdeba2cee5 100644 --- a/trunk/arch/sh/mm/fault_32.c +++ b/trunk/arch/sh/mm/fault_32.c @@ -60,8 +60,15 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) if (!pmd_present(*pmd)) set_pmd(pmd, *pmd_k); - else + else { + /* + * The page tables are fully synchronised so there must + * be another reason for the fault. Return NULL here to + * signal that we have not taken care of the fault. + */ BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); + return NULL; + } return pmd_k; } @@ -87,7 +94,7 @@ static noinline int vmalloc_fault(unsigned long address) * an interrupt in the middle of a task switch.. */ pgd_k = get_TTB(); - pmd_k = vmalloc_sync_one(__va((unsigned long)pgd_k), address); + pmd_k = vmalloc_sync_one(pgd_k, address); if (!pmd_k) return -1;