drm/nouveau/ltc: protect clearing of comptags with mutex

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
This commit is contained in:
Ben Skeggs 2016-12-13 09:29:55 +10:00
parent 64373e4bb6
commit f4e65efc88
1 changed files with 2 additions and 0 deletions

View File

@ -47,8 +47,10 @@ nvkm_ltc_tags_clear(struct nvkm_ltc *ltc, u32 first, u32 count)
BUG_ON((first > limit) || (limit >= ltc->num_tags));
mutex_lock(&ltc->subdev.mutex);
ltc->func->cbc_clear(ltc, first, limit);
ltc->func->cbc_wait(ltc);
mutex_unlock(&ltc->subdev.mutex);
}
int