]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: Fix ISP segfault issue in kernel v7.0
authorPratap Nirujogi <pratap.nirujogi@amd.com>
Wed, 11 Mar 2026 16:15:09 +0000 (12:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 16:19:29 +0000 (12:19 -0400)
commit3fc4648b53b7e393b91e63600e28e6f25c8ef0c5
treea86c3d291e11ddb6ebd85c00cec7be5f51c14537
parentf39e1270277f4b06db0b2c6ec9405b6dd766fb13
drm/amdgpu: Fix ISP segfault issue in kernel v7.0

Add NULL pointer checks for dev->type before accessing
dev->type->name in ISP genpd add/remove functions to
prevent kernel crashes.

This regression was introduced in v7.0 as the wakeup sources
are registered using physical device instead of ACPI device.
This led to adding wakeup source device as the first child of
AMDGPU device without initializing dev-type variable, and
resulted in segfault when accessed it in the amdgpu isp driver.

Fixes: 057edc58aa59 ("ACPI: PM: Register wakeup sources under physical devices")
Suggested-by: Bin Du <Bin.Du@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c51632d1ed7ac5aed2d40dbc0718d75342c12c6a)
drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c