Re: [PATCH] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-09-27 Thread Chen, Xiaogang
On 9/27/2023 9:19 AM, Eric Huang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On 2023-09-26 23:00, Xiaogang.Chen wrote: From: Xiaogang Chen prange->svm_bo unref can happen in both mmu callback

Re: [PATCH] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-09-27 Thread Eric Huang
On 2023-09-26 23:00, Xiaogang.Chen wrote: From: Xiaogang Chen prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by: Xiaogang.Chen

Re: [PATCH] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-09-27 Thread Philip Yang
On 2023-09-26 23:00, Xiaogang.Chen wrote: From: Xiaogang Chen prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random

RE: [PATCH] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-09-26 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - General] Reviewed-by: Jesse Zhang -Original Message- From: Xiaogang.Chen Sent: Wednesday, September 27, 2023 11:00 AM To: amd-gfx@lists.freedesktop.org Cc: Yang, Philip ; Kuehling, Felix ; Zhang, Jesse(Jie) ; Sierra Guiza, Alejandro (Alex) ; Chen, Xiaogang ;

[PATCH] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-09-26 Thread Xiaogang . Chen
From: Xiaogang Chen prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by: Xiaogang.Chen --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 9