diff options
Diffstat (limited to 'arch/mips/mm/fault.c')
-rw-r--r-- | arch/mips/mm/fault.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index ec8077c74e9c..345a4d6ec20f 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -212,6 +212,7 @@ vmalloc_fault: | |||
212 | */ | 212 | */ |
213 | int offset = __pgd_offset(address); | 213 | int offset = __pgd_offset(address); |
214 | pgd_t *pgd, *pgd_k; | 214 | pgd_t *pgd, *pgd_k; |
215 | pud_t *pud, *pud_k; | ||
215 | pmd_t *pmd, *pmd_k; | 216 | pmd_t *pmd, *pmd_k; |
216 | pte_t *pte_k; | 217 | pte_t *pte_k; |
217 | 218 | ||
@@ -222,8 +223,13 @@ vmalloc_fault: | |||
222 | goto no_context; | 223 | goto no_context; |
223 | set_pgd(pgd, *pgd_k); | 224 | set_pgd(pgd, *pgd_k); |
224 | 225 | ||
225 | pmd = pmd_offset(pgd, address); | 226 | pud = pud_offset(pgd, address); |
226 | pmd_k = pmd_offset(pgd_k, address); | 227 | pud_k = pud_offset(pgd_k, address); |
228 | if (!pud_present(*pud_k)) | ||
229 | goto no_context; | ||
230 | |||
231 | pmd = pmd_offset(pud, address); | ||
232 | pmd_k = pmd_offset(pud_k, address); | ||
227 | if (!pmd_present(*pmd_k)) | 233 | if (!pmd_present(*pmd_k)) |
228 | goto no_context; | 234 | goto no_context; |
229 | set_pmd(pmd, *pmd_k); | 235 | set_pmd(pmd, *pmd_k); |