1
0
Fork 0

drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv v2

Fixes a false positive from might_sleep(). The reservation object is freshly
initialized, so nobody else can hold the mutex but the function is
called from atomic context.

v2: Correctly invert the check as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
hifive-unleashed-5.1
Christian König 2017-08-17 12:23:51 +02:00 committed by Alex Deucher
parent d5de797ff1
commit df9bcb0652
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ static int ttm_bo_individualize_resv(struct ttm_buffer_object *bo)
return 0;
reservation_object_init(&bo->ttm_resv);
BUG_ON(reservation_object_lock(&bo->ttm_resv, NULL));
BUG_ON(!reservation_object_trylock(&bo->ttm_resv));
r = reservation_object_copy_fences(&bo->ttm_resv, bo->resv);
if (r) {