genirq: add threaded interrupt handler support
[firefly-linux-kernel-4.4.55.git] / kernel / exit.c
index efd30ccf38584f48c6ef68da62b9236479b6da69..ca0b3488c4a9550351f0ba679644719ba28299c3 100644 (file)
@@ -980,12 +980,9 @@ static void check_stack_usage(void)
 {
        static DEFINE_SPINLOCK(low_water_lock);
        static int lowest_to_date = THREAD_SIZE;
-       unsigned long *n = end_of_stack(current);
        unsigned long free;
 
-       while (*n == 0)
-               n++;
-       free = (unsigned long)n - (unsigned long)end_of_stack(current);
+       free = stack_not_used(current);
 
        if (free >= lowest_to_date)
                return;
@@ -1040,6 +1037,8 @@ NORET_TYPE void do_exit(long code)
                schedule();
        }
 
+       exit_irq_thread();
+
        exit_signals(tsk);  /* sets PF_EXITING */
        /*
         * tsk->flags are checked in the futex code to protect against