]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Handle non-terminated overdrive commands.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 17 Oct 2023 14:01:35 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:07:22 +0000 (17:07 +0000)
commite973f40de16125f3f85a07db68a2ad4a0aeb42c2
treefd27ee5208bad80072fd8ee695554cd4e0ca861f
parentdc4542861ec8dde92c3c8a5139bc412860aebe60
drm/amd/pm: Handle non-terminated overdrive commands.

commit 08e9ebc75b5bcfec9d226f9e16bab2ab7b25a39a upstream.

The incoming strings might not be terminated by a newline
or a 0.

(found while testing a program that just wrote the string
 itself, causing a crash)

Cc: stable@vger.kernel.org
Fixes: e3933f26b657 ("drm/amd/pp: Add edit/commit/show OD clock/voltage support in sysfs")
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/amdgpu_pm.c