task_stack: Fix end_of_stack() for architectures with upwards-growing stack
stable inclusion from linux-4.19.218 commit ca6b1b3e032cf6ae2a61303eba04848b10bd6efc -------------------------------- [ Upstream commit 9cc2fa4f ] The function end_of_stack() returns a pointer to the last entry of a stack. For architectures like parisc where the stack grows upwards return the pointer to the highest address in the stack. Without this change I faced a crash on parisc, because the stackleak functionality wrote STACKLEAK_POISON to the lowest address and thus overwrote the first 4 bytes of the task_struct which included the TIF_FLAGS. Signed-off-by:Helge Deller <deller@gmx.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment