]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - arch/arm/kernel/process.c
Apply preempt_rt patch-4.9-rt1.patch.xz
[zynq/linux.git] / arch / arm / kernel / process.c
index 91d2d5b014145d5fdc4071d027fb2358b9831347..750550098b593fe090cfe1cc3245e9e715159938 100644 (file)
@@ -322,6 +322,30 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
 }
 
 #ifdef CONFIG_MMU
+/*
+ * CONFIG_SPLIT_PTLOCK_CPUS results in a page->ptl lock.  If the lock is not
+ * initialized by pgtable_page_ctor() then a coredump of the vector page will
+ * fail.
+ */
+static int __init vectors_user_mapping_init_page(void)
+{
+       struct page *page;
+       unsigned long addr = 0xffff0000;
+       pgd_t *pgd;
+       pud_t *pud;
+       pmd_t *pmd;
+
+       pgd = pgd_offset_k(addr);
+       pud = pud_offset(pgd, addr);
+       pmd = pmd_offset(pud, addr);
+       page = pmd_page(*(pmd));
+
+       pgtable_page_ctor(page);
+
+       return 0;
+}
+late_initcall(vectors_user_mapping_init_page);
+
 #ifdef CONFIG_KUSER_HELPERS
 /*
  * The vectors page is always readable from user space for the