]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix the system memory page fault because of copy overflow
authorHuang Rui <ray.huang@amd.com>
Fri, 15 Jan 2021 18:39:14 +0000 (02:39 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jan 2021 20:21:49 +0000 (15:21 -0500)
commit1b6ff9ebff793811fb9b1bc829d57d8015067fb3
treebaabbaec2d457bc3c00ae097726a13a00ab6cbb1
parent5da306f44ce87ea5b5f170957e0723ff4226c42b
drm/amd/display: fix the system memory page fault because of copy overflow

The buffer is allocated with the size of pointer and copy with the size of
data structure. Then trigger the system memory page fault. Use the
orignal data structure to get the object size.

Fixes: c75acc5a527e ("drm/amd/display/dc/core/dc_link: Move some local data from the stack to the heap")
Signed-off-by: Huang Rui <ray.huang@amd.com>
Cc: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jinzhou.Su <Jinzhou.Su@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c