]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: Avoid power table parsing memory leaks
authorKees Cook <keescook@chromium.org>
Mon, 3 May 2021 05:06:08 +0000 (22:06 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 May 2021 21:37:57 +0000 (17:37 -0400)
commitff89d27d10b2ac51c2e69dc1877cb223ba51be60
treee0ed63039090e16766eadd6b3b218d6413f11328
parent1f587ec889366e84057e96f64100f3e0948c0e6e
drm/radeon: Avoid power table parsing memory leaks

Avoid leaving a hanging pre-allocated clock_info if last mode is
invalid, and avoid heap corruption if no valid modes are found.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211537
Fixes: 0bc5efe3581d ("drm/radeon/kms: fix segfault in pm rework")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_atombios.c