[PATCH] drm/gma500: dont expose bytes from kernel stack

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Aug 21 18:39:38 UTC 2016


Components m1, m2, p2, dot, vco of variable clock should be
initialized to avoid bytes from the kernel stack to be
exposed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index da9fd34..28bd8f3 100644
--- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
@@ -138,6 +138,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,
 	u32 target_vco, actual_freq;
 	s32 freq_error, min_error = 100000;
 
+	memset(clock, 0, sizeof(struct gma_clock_t));
 	memset(best_clock, 0, sizeof(*best_clock));
 
 	for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
-- 
2.1.4



More information about the dri-devel mailing list