Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-14 Thread Alex Deucher
On Mon, Feb 13, 2017 at 9:56 PM, zhoucm1 wrote: > > > On 2017年02月14日 03:03, Nicolai Hähnle wrote: >> >> On 13.02.2017 19:58, Nicolai Hähnle wrote: >>> >>> On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: > > On 13.02.2017 19:04,

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-14 Thread Nicolai Hähnle
On 14.02.2017 03:56, zhoucm1 wrote: On 2017年02月14日 03:03, Nicolai Hähnle wrote: On 13.02.2017 19:58, Nicolai Hähnle wrote: On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pito

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread zhoucm1
On 2017年02月14日 03:03, Nicolai Hähnle wrote: On 13.02.2017 19:58, Nicolai Hähnle wrote: On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 07:58 PM, Nicolai Hähnle wrote: On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 13.02.2017 19:58, Nicolai Hähnle wrote: On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, S

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 13.02.2017 19:38, Samuel Pitoiset wrote: On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fa

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 07:41 PM, Christian König wrote: Am 13.02.2017 um 19:32 schrieb Samuel Pitoiset: On 02/13/2017 07:19 PM, Nicolai Hähnle wrote: On 13.02.2017 19:11, Samuel Pitoiset wrote: On 02/13/2017 07:04 PM, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Christian König
Am 13.02.2017 um 19:32 schrieb Samuel Pitoiset: On 02/13/2017 07:19 PM, Nicolai Hähnle wrote: On 13.02.2017 19:11, Samuel Pitoiset wrote: On 02/13/2017 07:04 PM, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.201

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 07:09 PM, Nicolai Hähnle wrote: On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 07:19 PM, Nicolai Hähnle wrote: On 13.02.2017 19:11, Samuel Pitoiset wrote: On 02/13/2017 07:04 PM, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 13.02.2017 19:11, Samuel Pitoiset wrote: On 02/13/2017 07:04 PM, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocke

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 07:04 PM, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "poss

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 13.02.2017 19:04, Nicolai Hähnle wrote: On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 13.02.2017 18:49, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 06:49 PM, Samuel Pitoiset wrote: On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this cod

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Samuel Pitoiset
On 02/13/2017 05:25 PM, Nicolai Hähnle wrote: On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WAR

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-13 Thread Nicolai Hähnle
On 09.02.2017 11:33, Samuel Pitoiset wrote: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fa

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-09 Thread Christian König
Am 09.02.2017 um 11:33 schrieb Samuel Pitoiset: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init(

[PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-09 Thread Samuel Pitoiset
When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fails and the mutex was locked as expected. Thi