diff options
Diffstat (limited to 'arch/arm/lib/uaccess_with_memcpy.c')
-rw-r--r-- | arch/arm/lib/uaccess_with_memcpy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c index e2d2f2cd0c4f..8b9b13649f81 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c | |||
@@ -27,13 +27,18 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp) | |||
27 | pgd_t *pgd; | 27 | pgd_t *pgd; |
28 | pmd_t *pmd; | 28 | pmd_t *pmd; |
29 | pte_t *pte; | 29 | pte_t *pte; |
30 | pud_t *pud; | ||
30 | spinlock_t *ptl; | 31 | spinlock_t *ptl; |
31 | 32 | ||
32 | pgd = pgd_offset(current->mm, addr); | 33 | pgd = pgd_offset(current->mm, addr); |
33 | if (unlikely(pgd_none(*pgd) || pgd_bad(*pgd))) | 34 | if (unlikely(pgd_none(*pgd) || pgd_bad(*pgd))) |
34 | return 0; | 35 | return 0; |
35 | 36 | ||
36 | pmd = pmd_offset(pgd, addr); | 37 | pud = pud_offset(pgd, addr); |
38 | if (unlikely(pud_none(*pud) || pud_bad(*pud))) | ||
39 | return 0; | ||
40 | |||
41 | pmd = pmd_offset(pud, addr); | ||
37 | if (unlikely(pmd_none(*pmd) || pmd_bad(*pmd))) | 42 | if (unlikely(pmd_none(*pmd) || pmd_bad(*pmd))) |
38 | return 0; | 43 | return 0; |
39 | 44 | ||