Re: [PATCH v2 5/6] amdgpu: fix invalid memory access in amdgpu_fence_driver_sw_fini()

2025-01-07 Thread Chen, Xiaogang
On 1/4/2025 8:45 PM, Jiang Liu wrote: Function detects initialization status by checking sched->ops, so set sched->ops to non-NULL just before return in function drm_sched_init() This commit message is not what the change did: you set sched->ops to NULL just after return from drm_sched_init.

[PATCH v2 5/6] amdgpu: fix invalid memory access in amdgpu_fence_driver_sw_fini()

2025-01-05 Thread Jiang Liu
Function detects initialization status by checking sched->ops, so set sched->ops to non-NULL just before return in function drm_sched_init() to avoid possible invalid memory access on error recover path. Signed-off-by: Jiang Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/d