aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 8f6185e69b69..fb8de6cbf2c7 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -899,12 +899,9 @@ static void check_stack_usage(void)
899{ 899{
900 static DEFINE_SPINLOCK(low_water_lock); 900 static DEFINE_SPINLOCK(low_water_lock);
901 static int lowest_to_date = THREAD_SIZE; 901 static int lowest_to_date = THREAD_SIZE;
902 unsigned long *n = end_of_stack(current);
903 unsigned long free; 902 unsigned long free;
904 903
905 while (*n == 0) 904 free = stack_not_used(current);
906 n++;
907 free = (unsigned long)n - (unsigned long)end_of_stack(current);
908 905
909 if (free >= lowest_to_date) 906 if (free >= lowest_to_date)
910 return; 907 return;