Re: [PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-06 Thread Christian König
Hi Qu, Am 06.04.21 um 08:04 schrieb Qu Huang: Hi Christian, On 2021/4/3 16:49, Christian König wrote: Hi Qu, Am 03.04.21 um 07:08 schrieb Qu Huang: Hi Christian, On 2021/4/3 0:25, Christian König wrote: Hi Qu, Am 02.04.21 um 05:18 schrieb Qu Huang: Before dma_resv_lock(bo->base.resv, NUL

Re: [PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-05 Thread Qu Huang
Hi Christian, On 2021/4/3 16:49, Christian König wrote: Hi Qu, Am 03.04.21 um 07:08 schrieb Qu Huang: Hi Christian, On 2021/4/3 0:25, Christian König wrote: Hi Qu, Am 02.04.21 um 05:18 schrieb Qu Huang: Before dma_resv_lock(bo->base.resv, NULL) in amdgpu_bo_release_notify(), the bo->base.r

Re: [PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-03 Thread Christian König
Hi Qu, Am 03.04.21 um 07:08 schrieb Qu Huang: Hi Christian, On 2021/4/3 0:25, Christian König wrote: Hi Qu, Am 02.04.21 um 05:18 schrieb Qu Huang: Before dma_resv_lock(bo->base.resv, NULL) in amdgpu_bo_release_notify(), the bo->base.resv lock may be held by ttm_mem_evict_first(), That can

Re: [PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-02 Thread Qu Huang
Hi Christian, On 2021/4/3 0:25, Christian König wrote: Hi Qu, Am 02.04.21 um 05:18 schrieb Qu Huang: Before dma_resv_lock(bo->base.resv, NULL) in amdgpu_bo_release_notify(), the bo->base.resv lock may be held by ttm_mem_evict_first(), That can't happen since when bo_release_notify is called

Re: [PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-02 Thread Christian König
Hi Qu, Am 02.04.21 um 05:18 schrieb Qu Huang: Before dma_resv_lock(bo->base.resv, NULL) in amdgpu_bo_release_notify(), the bo->base.resv lock may be held by ttm_mem_evict_first(), That can't happen since when bo_release_notify is called the BO has not more references and is therefore deleted.

[PATCH] drm/amdgpu: Fix a potential sdma invalid access

2021-04-01 Thread Qu Huang
Before dma_resv_lock(bo->base.resv, NULL) in amdgpu_bo_release_notify(), the bo->base.resv lock may be held by ttm_mem_evict_first(), and the VRAM mem will be evicted, mem region was replaced by Gtt mem region. amdgpu_bo_release_notify() will then hold the bo->base.resv lock, and SDMA will get an i