diff options
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -456,6 +456,13 @@ static int get_gate_page(struct mm_struct *mm, unsigned long address, if ((gup_flags & FOLL_DUMP) || !is_zero_pfn(pte_pfn(*pte))) goto unmap; *page = pte_page(*pte); + + /* + * This should never happen (a device public page in the gate + * area). + */ + if (is_device_public_page(*page)) + goto unmap; } get_page(*page); out: |