diff options
author | LongJun Tang <tanglongjun@kylinos.cn> | 2022-11-04 17:29:31 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-11-09 17:41:42 -0500 |
commit | fcb4f9193ee550aad05c8d0f8f6637143e567c80 (patch) | |
tree | fbf0888902d917a5f92a02ef607cda65f6cffd94 /drivers/gpu/drm/amd/display/dc/dcn302 | |
parent | e50db38342d5d2243e9738a51c9737cbb017e456 (diff) | |
download | linux-stable-fcb4f9193ee550aad05c8d0f8f6637143e567c80.tar.gz linux-stable-fcb4f9193ee550aad05c8d0f8f6637143e567c80.tar.bz2 linux-stable-fcb4f9193ee550aad05c8d0f8f6637143e567c80.zip |
drm/amd/display: Have risk for memory exhaustion
In dcn*_clock_source_create when dcn*_clk_src_construct fails allocated
clk_src needs release. A local attack could use this to cause memory
exhaustion.
Signed-off-by: LongJun Tang <tanglongjun@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn302')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c index d3945876aced..9ca7db0ec7b0 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c @@ -464,6 +464,7 @@ static struct clock_source *dcn302_clock_source_create(struct dc_context *ctx, s return &clk_src->base; } + kfree(clk_src); BREAK_TO_DEBUGGER(); return NULL; } |