Re: [PATCH libdrm 1/2] drm:fix race issue between two bo functions(v2)

2017-08-08 Thread Christian König
h ... Yeah, that obviously works as well :) Christian. BR Monk -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, August 8, 2017 3:44 PM To: Liu, Monk ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH libdrm 1/2] drm:fix race issue between two bo

RE: [PATCH libdrm 1/2] drm:fix race issue between two bo functions(v2)

2017-08-08 Thread Liu, Monk
Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, August 8, 2017 3:44 PM To: Liu, Monk ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH libdrm 1/2] drm:fix race issue between two bo functions(v2) Am 08.08.2017 um 09:34 schrieb Monk Liu: > From: Monk Liu

Re: [PATCH libdrm 1/2] drm:fix race issue between two bo functions(v2)

2017-08-08 Thread Christian König
Am 08.08.2017 um 09:34 schrieb Monk Liu: From: Monk Liu there is race issue between two threads on amdgpu_bo_reference and amdgpu_bo_import, this patch tends to fix it by moving the pthread_mutex_lock out of bo_free_internal and move to bo_reference to cover the update_reference part. The mute