ARM: 8559/1: errata: Workaround erratum A12 821420
[deliverable/linux.git] / arch / arm / kernel / process.c
index 4adfb46e3ee93276ea506b723eb11e33c57459f4..612eb530f33fcd19bc4539facb26fc30a2583979 100644 (file)
@@ -96,19 +96,23 @@ void __show_regs(struct pt_regs *regs)
        unsigned long flags;
        char buf[64];
 #ifndef CONFIG_CPU_V7M
-       unsigned int domain;
+       unsigned int domain, fs;
 #ifdef CONFIG_CPU_SW_DOMAIN_PAN
        /*
         * Get the domain register for the parent context. In user
         * mode, we don't save the DACR, so lets use what it should
         * be. For other modes, we place it after the pt_regs struct.
         */
-       if (user_mode(regs))
+       if (user_mode(regs)) {
                domain = DACR_UACCESS_ENABLE;
-       else
-               domain = *(unsigned int *)(regs + 1);
+               fs = get_fs();
+       } else {
+               domain = to_svc_pt_regs(regs)->dacr;
+               fs = to_svc_pt_regs(regs)->addr_limit;
+       }
 #else
        domain = get_domain();
+       fs = get_fs();
 #endif
 #endif
 
@@ -144,7 +148,7 @@ void __show_regs(struct pt_regs *regs)
                if ((domain & domain_mask(DOMAIN_USER)) ==
                    domain_val(DOMAIN_USER, DOMAIN_NOACCESS))
                        segment = "none";
-               else if (get_fs() == get_ds())
+               else if (fs == get_ds())
                        segment = "kernel";
                else
                        segment = "user";
@@ -193,9 +197,9 @@ EXPORT_SYMBOL_GPL(thread_notify_head);
 /*
  * Free current thread data structures etc..
  */
-void exit_thread(void)
+void exit_thread(struct task_struct *tsk)
 {
-       thread_notify(THREAD_NOTIFY_EXIT, current_thread_info());
+       thread_notify(THREAD_NOTIFY_EXIT, task_thread_info(tsk));
 }
 
 void flush_thread(void)
@@ -420,7 +424,8 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
        npages = 1; /* for sigpage */
        npages += vdso_total_pages;
 
-       down_write(&mm->mmap_sem);
+       if (down_write_killable(&mm->mmap_sem))
+               return -EINTR;
        hint = sigpage_addr(mm, npages);
        addr = get_unmapped_area(NULL, hint, npages << PAGE_SHIFT, 0, 0);
        if (IS_ERR_VALUE(addr)) {
This page took 0.027841 seconds and 5 git commands to generate.