]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/vm86_32.c
x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
[karo-tx-linux.git] / arch / x86 / kernel / vm86_32.c
index 0442d98367aec50f3810a332c81be5eac0a29a95..7924a5356c8a9105171f1b07a3911758b815a3ee 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/syscalls.h>
 #include <linux/sched.h>
+#include <linux/sched/task_stack.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
 #include <linux/string.h>
@@ -163,6 +164,7 @@ static void mark_screen_rdonly(struct mm_struct *mm)
        struct vm_area_struct *vma;
        spinlock_t *ptl;
        pgd_t *pgd;
+       p4d_t *p4d;
        pud_t *pud;
        pmd_t *pmd;
        pte_t *pte;
@@ -172,7 +174,10 @@ static void mark_screen_rdonly(struct mm_struct *mm)
        pgd = pgd_offset(mm, 0xA0000);
        if (pgd_none_or_clear_bad(pgd))
                goto out;
-       pud = pud_offset(pgd, 0xA0000);
+       p4d = p4d_offset(pgd, 0xA0000);
+       if (p4d_none_or_clear_bad(p4d))
+               goto out;
+       pud = pud_offset(p4d, 0xA0000);
        if (pud_none_or_clear_bad(pud))
                goto out;
        pmd = pmd_offset(pud, 0xA0000);
@@ -192,7 +197,7 @@ static void mark_screen_rdonly(struct mm_struct *mm)
        pte_unmap_unlock(pte, ptl);
 out:
        up_write(&mm->mmap_sem);
-       flush_tlb();
+       flush_tlb_mm_range(mm, 0xA0000, 0xA0000 + 32*PAGE_SIZE, 0UL);
 }