kmemleak_scan_task_stacks() assumes that the kernel stack size is
THREAD_SIZE.
The allocated kernel stack size may not be THREAD_SIZE anymore, rely
on the newly introduced helpers task_stack_{low, high}()Signed-off-by: Mostafa Saleh <[email protected]> --- mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 8fa409a4f9fb..72e2c628a20b 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1749,7 +1749,7 @@ static void kmemleak_scan_task_stacks(void) void *stack = try_get_task_stack(p); if (stack) { - stop = scan_block(stack, stack + THREAD_SIZE, NULL); + stop = scan_block(task_stack_low(p), task_stack_high(p), NULL); put_task_stack(p); } put_task_struct(p); -- 2.56.0.rc1.315.gc6ed9934b7-goog

