]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: Release VFCT ACPI table reference
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 8 Jul 2026 19:35:15 +0000 (14:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Jul 2026 21:39:00 +0000 (17:39 -0400)
commit65bff26617607c1331283232016c0e89088c5b78
tree3126a0936eee1a8dcbf64a4b064e9961d515c51c
parentdb7e8108809a2245f0a17ba323f027cac0941ffb
drm/amdgpu: Release VFCT ACPI table reference

amdgpu_acpi_vfct_bios() fetches the VFCT table with acpi_get_table()
but never releases it. acpi_get_table() takes a reference on the
table (incrementing its validation_count and mapping it on the 0->1
transition); without a paired acpi_put_table() the mapping is leaked
on every call, whether or not a matching VBIOS image is found.

Route all exit paths after the table is acquired through a common
acpi_put_table(). The VBIOS image is copied out with kmemdup() before
the table is released, so it remains valid for the caller.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260708193518.702584-3-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ca5988682b4cba4cd125a0fa99b2de1239164ae4)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c