提交 fcb4f919 编写于 作者: L LongJun Tang 提交者: Alex Deucher

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: NLongJun Tang <tanglongjun@kylinos.cn>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e50db383
......@@ -1328,6 +1328,7 @@ static struct clock_source *dcn30_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -1288,6 +1288,7 @@ static struct clock_source *dcn301_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -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;
}
......
......@@ -431,6 +431,7 @@ static struct clock_source *dcn303_clock_source_create(struct dc_context *ctx, s
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -1629,6 +1629,7 @@ static struct clock_source *dcn31_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -1627,6 +1627,7 @@ static struct clock_source *dcn31_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -830,6 +830,7 @@ static struct clock_source *dcn32_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
......@@ -829,6 +829,7 @@ static struct clock_source *dcn321_clock_source_create(
return &clk_src->base;
}
kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册