Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-24 Thread Grodzovsky, Andrey
I see now. In that case the change seems good to me. Andrey From: Koenig, Christian Sent: 24 March 2020 13:58 To: Grodzovsky, Andrey ; Pan, Xinhui ; Tao, Yintian ; Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: hold

Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-24 Thread Christian König
*Cc:* amd-gfx@lists.freedesktop.org *Subject:* Re: [PATCH] drm/amdgpu: hold the reference of finished fence On 3/23/20 10:22 AM, Yintian Tao wrote: > There is one one corner case at dma_fence_signal_locked > which will raise the NULL pointer problem just like below. > ->dma_

Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-24 Thread Andrey Grodzovsky
:* amd-gfx on behalf of Andrey Grodzovsky *Sent:* Tuesday, March 24, 2020 11:40:06 AM *To:* Tao, Yintian ; Koenig, Christian ; Deucher, Alexander *Cc:* amd-gfx@lists.freedesktop.org *Subject:* Re: [PATCH] drm/amdgpu: hold the reference of finished fence On 3/23/20 10:22 AM, Yintian Tao wrote

Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-24 Thread Pan, Xinhui
Grodzovsky Sent: Tuesday, March 24, 2020 11:40:06 AM To: Tao, Yintian ; Koenig, Christian ; Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: hold the reference of finished fence On 3/23/20 10:22 AM, Yintian Tao wrote: > There is one one corner c

Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Andrey Grodzovsky
On 3/23/20 10:22 AM, Yintian Tao wrote: There is one one corner case at dma_fence_signal_locked which will raise the NULL pointer problem just like below. ->dma_fence_signal ->dma_fence_signal_locked ->test_and_set_bit here trigger dma_fence_release happen due to the zero of fence

[PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Yintian Tao
There is one one corner case at dma_fence_signal_locked which will raise the NULL pointer problem just like below. ->dma_fence_signal ->dma_fence_signal_locked ->test_and_set_bit here trigger dma_fence_release happen due to the zero of fence refcount. ->dma_fence_put

[PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Yintian Tao
There is one one corner case at dma_fence_signal_locked which will raise the NULL pointer problem just like below. ->dma_fence_signal ->dma_fence_signal_locked ->test_and_set_bit here trigger dma_fence_release happen due to the zero of fence refcount. ->dma_fence_put

RE: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Tao, Yintian
xander Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: hold the reference of finished fence I've just double checked and your analyses actually can't be correct. When we call dma_fence_signal() in amdgpu_fence_process() we still have a reference to the fence. See the cod

Re: [PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Christian König
I've just double checked and your analyses actually can't be correct. When we call dma_fence_signal() in amdgpu_fence_process() we still have a reference to the fence. See the code here:     r = dma_fence_signal(fence);     if (!r)    

[PATCH] drm/amdgpu: hold the reference of finished fence

2020-03-23 Thread Yintian Tao
There is one one corner case at dma_fence_signal_locked which will raise the NULL pointer problem just like below. ->dma_fence_signal ->dma_fence_signal_locked ->test_and_set_bit here trigger dma_fence_release happen due to the zero of fence refcount. ->dma_fence_put