Merge branch 'android-4.14-spl-topic' into exynos9609
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / kernel / exit.c
index f6cad39f35dfbe441abc5fc740458a6574e7d529..db135aa5b5d90892303891ab151d40b473c21895 100644 (file)
@@ -62,6 +62,8 @@
 #include <linux/random.h>
 #include <linux/rcuwait.h>
 #include <linux/compat.h>
+#include <linux/cpufreq_times.h>
+#include <linux/ems.h>
 
 #include <linux/uaccess.h>
 #include <asm/unistd.h>
@@ -185,6 +187,9 @@ void release_task(struct task_struct *p)
 {
        struct task_struct *leader;
        int zap_leader;
+#ifdef CONFIG_CPU_FREQ_TIMES
+       cpufreq_task_times_exit(p);
+#endif
 repeat:
        /* don't need to get the RCU readlock here - the process is dead and
         * can't be modifying its own credentials. But shut RCU-lockdep up */
@@ -809,6 +814,8 @@ void __noreturn do_exit(long code)
        }
 
        exit_signals(tsk);  /* sets PF_EXITING */
+       sync_band(tsk, LEAVE_BAND);
+
        /*
         * Ensure that all new tsk->pi_lock acquisitions must observe
         * PF_EXITING. Serializes against futex.c:attach_to_pi_owner().
@@ -1755,3 +1762,12 @@ Efault:
        return -EFAULT;
 }
 #endif
+
+__weak void abort(void)
+{
+       BUG();
+
+       /* if that doesn't kill us, halt */
+       panic("Oops failed to kill thread");
+}
+EXPORT_SYMBOL(abort);