Skip to content

Commit

Permalink
drm/nouveau/fifo/nv04: avoid ramht race against cookie insertion
Browse files Browse the repository at this point in the history
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
imirkin authored and Ben Skeggs committed Sep 22, 2016
1 parent 47a66e4 commit 666ca3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ nv04_fifo_dma_object_dtor(struct nvkm_fifo_chan *base, int cookie)
{
struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem;

mutex_lock(&chan->fifo->base.engine.subdev.mutex);
nvkm_ramht_remove(imem->ramht, cookie);
mutex_unlock(&chan->fifo->base.engine.subdev.mutex);
}

static int
Expand Down

0 comments on commit 666ca3d

Please sign in to comment.