diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/mm/fault-armv.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 074e6bb54eb3..7a8efe1b37d8 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
| @@ -73,16 +73,12 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
| 73 | int ret; | 73 | int ret; |
| 74 | 74 | ||
| 75 | pgd = pgd_offset(vma->vm_mm, address); | 75 | pgd = pgd_offset(vma->vm_mm, address); |
| 76 | if (pgd_none(*pgd)) | 76 | if (pgd_none_or_clear_bad(pgd)) |
| 77 | goto no_pgd; | 77 | return 0; |
| 78 | if (pgd_bad(*pgd)) | ||
| 79 | goto bad_pgd; | ||
| 80 | 78 | ||
| 81 | pmd = pmd_offset(pgd, address); | 79 | pmd = pmd_offset(pgd, address); |
| 82 | if (pmd_none(*pmd)) | 80 | if (pmd_none_or_clear_bad(pmd)) |
| 83 | goto no_pmd; | 81 | return 0; |
| 84 | if (pmd_bad(*pmd)) | ||
| 85 | goto bad_pmd; | ||
| 86 | 82 | ||
| 87 | pte = pte_offset_map(pmd, address); | 83 | pte = pte_offset_map(pmd, address); |
| 88 | 84 | ||
| @@ -91,18 +87,6 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
| 91 | pte_unmap(pte); | 87 | pte_unmap(pte); |
| 92 | 88 | ||
| 93 | return ret; | 89 | return ret; |
| 94 | |||
| 95 | bad_pgd: | ||
| 96 | pgd_ERROR(*pgd); | ||
| 97 | pgd_clear(pgd); | ||
| 98 | no_pgd: | ||
| 99 | return 0; | ||
| 100 | |||
| 101 | bad_pmd: | ||
| 102 | pmd_ERROR(*pmd); | ||
| 103 | pmd_clear(pmd); | ||
| 104 | no_pmd: | ||
| 105 | return 0; | ||
| 106 | } | 90 | } |
| 107 | 91 | ||
| 108 | static void | 92 | static void |
