Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2898f85 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Greg Kroah-Hartman
Browse files

drm/nouveau/fifo/nv04: avoid ramht race against cookie insertion



commit 666ca3d8f19082f40745d75f3cc7cc0200ee87e3 upstream.

Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ba8db47
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,7 +36,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