diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-12-13 09:29:55 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-12-13 11:40:09 +1000 |
commit | f4e65efc88b64c1dbca275d42a188edccedb56c6 (patch) | |
tree | 358ba57ac8f56d8075e1c7feca22121dac7e594c /drivers | |
parent | 64373e4bb6e13f571145d32202907cdffe861550 (diff) | |
download | linux-f4e65efc88b64c1dbca275d42a188edccedb56c6.tar.bz2 |
drm/nouveau/ltc: protect clearing of comptags with mutex
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c index 39c2a38e54f7..0c7ef250dcaf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c @@ -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(<c->subdev.mutex); ltc->func->cbc_clear(ltc, first, limit); ltc->func->cbc_wait(ltc); + mutex_unlock(<c->subdev.mutex); } int |