diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index c9e5a1c14e08..e69edc74aeeb 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -981,12 +981,9 @@ static void check_stack_usage(void) | |||
981 | { | 981 | { |
982 | static DEFINE_SPINLOCK(low_water_lock); | 982 | static DEFINE_SPINLOCK(low_water_lock); |
983 | static int lowest_to_date = THREAD_SIZE; | 983 | static int lowest_to_date = THREAD_SIZE; |
984 | unsigned long *n = end_of_stack(current); | ||
985 | unsigned long free; | 984 | unsigned long free; |
986 | 985 | ||
987 | while (*n == 0) | 986 | free = stack_not_used(current); |
988 | n++; | ||
989 | free = (unsigned long)n - (unsigned long)end_of_stack(current); | ||
990 | 987 | ||
991 | if (free >= lowest_to_date) | 988 | if (free >= lowest_to_date) |
992 | return; | 989 | return; |