mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amdgpu: check ras and obj before dereference
nbio_v7_9_handle_ras_controller_intr_no_bifring() dereferences ras and obj without checking either for NULL. Both amdgpu_ras_get_context() and amdgpu_ras_find_obj() can return NULL, e.g. during the window between adev->nbio.ras being set (early in amdgpu_ras_init(), by design, to enable the fatal-error interrupt as soon as possible) and the PCIE_BIF ras object actually being created in RAS late_init. Any interrupt in that window crashes in hard-IRQ context. This is analogous to commitd190b459b2("drm/amdgpu: the warning dereferencing obj for nbio_v7_4"), which fixed the same issue in the nbio_v7_4 handler. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes:7692e1ee24("drm/amdgpu: add RAS fatal error handler for NBIO v7.9") Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Dmitriy Chumachenko <Dmitry.Chumachenko@cyberprotect.ru> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commitc7071767a5)
This commit is contained in:
parent
636139603b
commit
723d4dc628
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue