From: Ben Skeggs Date: Mon, 12 Dec 2016 23:29:55 +0000 (+1000) Subject: drm/nouveau/ltc: protect clearing of comptags with mutex X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4e65efc88b64c1dbca275d42a188edccedb56c6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau/ltc: protect clearing of comptags with mutex Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org --- 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