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>
This commit is contained in:
LongJun Tang
2022-11-04 17:29:31 +08:00
committed by Alex Deucher
parent e50db38342
commit fcb4f9193e
8 changed files with 8 additions and 0 deletions

View File

@@ -1629,6 +1629,7 @@ static struct clock_source *dcn31_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}