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 f80dec3f1875..70612c19ac96 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -977,12 +977,9 @@ static void check_stack_usage(void) | |||
977 | { | 977 | { |
978 | static DEFINE_SPINLOCK(low_water_lock); | 978 | static DEFINE_SPINLOCK(low_water_lock); |
979 | static int lowest_to_date = THREAD_SIZE; | 979 | static int lowest_to_date = THREAD_SIZE; |
980 | unsigned long *n = end_of_stack(current); | ||
981 | unsigned long free; | 980 | unsigned long free; |
982 | 981 | ||
983 | while (*n == 0) | 982 | free = stack_not_used(current); |
984 | n++; | ||
985 | free = (unsigned long)n - (unsigned long)end_of_stack(current); | ||
986 | 983 | ||
987 | if (free >= lowest_to_date) | 984 | if (free >= lowest_to_date) |
988 | return; | 985 | return; |