Merge branch 'android-4.14-spl-topic' into exynos9609
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / kernel / exit.c
index 5a0c4791473c3cb7a5135ea2c3ea3c39afd95b38..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().
@@ -1763,3 +1770,4 @@ __weak void abort(void)
        /* if that doesn't kill us, halt */
        panic("Oops failed to kill thread");
 }
+EXPORT_SYMBOL(abort);