aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2025-09-01 12:40:32 +0000
committerMaxime Ripard <[email protected]>2025-09-02 10:58:56 +0000
commit232674e1a6dd2f7a68b0d496a7ed1a57d79533da (patch)
tree925493261fb2917f2536c2fccb557a640504beee /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentaccel/ivpu: Prevent recovery work from being queued during device removal (diff)
downloadkernel-232674e1a6dd2f7a68b0d496a7ed1a57d79533da.tar.gz
kernel-232674e1a6dd2f7a68b0d496a7ed1a57d79533da.zip
drm/sched: Fix racy access to drm_sched_entity.dependency
The drm_sched_job_unschedulable trace point can access entity->dependency after it was cleared by the callback installed in drm_sched_entity_add_dependency_cb, causing: BUG: kernel NULL pointer dereference, address: 0000000000000020 [...] Workqueue: comp_1.1.0 drm_sched_run_job_work [gpu_sched] RIP: 0010:trace_event_raw_event_drm_sched_job_unschedulable+0x70/0xd0 [gpu_sched] To fix this we either need to keep a reference to the fence before setting up the callbacks, or move the trace_drm_sched_job_unschedulable calls into drm_sched_entity_add_dependency_cb where they can be done earlier. Fixes: 76d97c870f29 ("drm/sched: Trace dependencies for GPU jobs") Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Philipp Stanner <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit b2b8af21fec35be417a3199b5a6c354605dd222a) Signed-off-by: Maxime Ripard <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions