Skip to content

Commit

Permalink
drm/nouveau/ltc: protect clearing of comptags with mutex
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Ben Skeggs committed Dec 13, 2016
1 parent 64373e4 commit f4e65ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4e65ef

Please sign in to comment.