]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:45 +0000 (10:29 +0200)
commit88a2148284db8fbfe5ef169ae9ab3c4925f05678
tree1564733202cb9c04a6d1e138991ad12a0a39702a
parent0e99b5416f220c037d50401cda60550f3e82e92b
drm/radeon: Avoid power table parsing memory leaks

[ Upstream commit c69f27137a38d24301a6b659454a91ad85dff4aa ]

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: 6991b8f2a319 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/radeon/radeon_atombios.c