]> Pileus Git - ~andy/linux/blobdiff - kernel/exit.c
Merge branch 'linus' into stackprotector
[~andy/linux] / kernel / exit.c
index c9e5a1c14e081eb8dd9873e0eef89d964c344bc1..e69edc74aeebbebc92abcb45f722e35ddc3b6667 100644 (file)
@@ -981,12 +981,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;