]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail
authorFlora Cui <Flora.Cui@amd.com>
Wed, 20 Apr 2016 02:23:47 +0000 (10:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Apr 2016 16:26:50 +0000 (12:26 -0400)
commitd1ae4a1b9d6f3d5ec14538cb70a369ac1618d134
treef9b6f852d5d928e463a1427bcb95f6a54f72634a
parent5662ffb6a17d77725da930c1be4b5bc4f2c002f4
drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail

Fixes the following scenario:

1. Page table bo allocated in vram and linked to man->lru.
   tbo->list_kref.refcount=2
2. Page table bo is swapped out and removed from man->lru.
   tbo->list_kref.refcount=1
3. Command submission from userspace.  Page table bo is moved
   to vram.  ttm_bo_move_to_lru_tail() link it to man->lru and
   don't increase the kref count.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/ttm/ttm_bo.c