drm/ttm: fix deref of bo->ttm without holding the lock v2
authorChristian König <christian.koenig@amd.com>
Fri, 28 May 2021 12:34:38 +0000 (14:34 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 8 Jun 2021 11:24:15 +0000 (13:24 +0200)
commit2d2ddb589d5925ec7f2d1b17d88a2b36bf536105
tree26f8bb253815fb1dad99a683f45f2f27c2daa882
parent9bf3797796f570b34438235a6a537df85832bdad
drm/ttm: fix deref of bo->ttm without holding the lock v2

We need to grab the resv lock first before doing that check.

v2 (chk): simplify the change for -fixes

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210528130041.1683-1-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_device.c