Merge branch 'linus' into stackprotector
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / exit.c
index 85a83c8..c8d0485 100644 (file)
@@ -968,12 +968,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;