Merge branch 'android-4.14-spl-topic' into exynos9609
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / kernel / exit.c
index 48e2842ee217bc53de55de463f9d843b1e732fe0..db135aa5b5d90892303891ab151d40b473c21895 100644 (file)
@@ -63,6 +63,7 @@
 #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>
@@ -186,8 +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 */
@@ -812,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().