diff options
| -rw-r--r-- | arch/arm/mm/fault.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 84131c832430..564b1c4829e4 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
| @@ -413,7 +413,16 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
| 413 | pmd_k = pmd_offset(pgd_k, addr); | 413 | pmd_k = pmd_offset(pgd_k, addr); |
| 414 | pmd = pmd_offset(pgd, addr); | 414 | pmd = pmd_offset(pgd, addr); |
| 415 | 415 | ||
| 416 | if (pmd_none(*pmd_k)) | 416 | /* |
| 417 | * On ARM one Linux PGD entry contains two hardware entries (see page | ||
| 418 | * tables layout in pgtable.h). We normally guarantee that we always | ||
| 419 | * fill both L1 entries. But create_mapping() doesn't follow the rule. | ||
| 420 | * It can create inidividual L1 entries, so here we have to call | ||
| 421 | * pmd_none() check for the entry really corresponded to address, not | ||
| 422 | * for the first of pair. | ||
| 423 | */ | ||
| 424 | index = (addr >> SECTION_SHIFT) & 1; | ||
| 425 | if (pmd_none(pmd_k[index])) | ||
| 417 | goto bad_area; | 426 | goto bad_area; |
| 418 | 427 | ||
| 419 | copy_pmd(pmd, pmd_k); | 428 | copy_pmd(pmd, pmd_k); |
