kmemleak: Fix bad memory access with scan stack for amlogic vmap 72/252172/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 25 Jan 2021 06:44:20 +0000 (15:44 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 25 Jan 2021 06:49:58 +0000 (15:49 +0900)
commit60021b40cb179630c2c7aae90a2a9882a7b18192
tree8cc45103506093a51981374cd34a4adccce3192e
parente4fd24aeabed64cd82033a53f0ef130a07f2932d
kmemleak: Fix bad memory access with scan stack for amlogic vmap

When AMLOGIC_VMAP is enabled, try_get_task_stack() returns address
of stasck instead of page address. This causes bad memory access
during kmemleak scan stack. Fix the bad memory access by using
aml_task_stack().

Note: Maybe, get_task_stack() needs to call aml_task_stack() is
required, but aml_task_stack() has no consideration for kmalloced
task stack, so just fix from kmemleak.

Change-Id: I58a2e324cb92cd692d2260c675e81d7d0715e96c
Fixes: commit 4d6ae4359385 ("mm: optimize thread stack usage on arm64 [1/1]")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
mm/kmemleak.c