Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit b26a231

Browse files
author
Ben Skeggs
committed
drm/nouveau: fix race when adding delayed work items
kernel.org bz#198221. Reported-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 parent 4ef9289 commit b26a231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ nouveau_cli_work_queue(struct nouveau_cli *cli, struct dma_fence *fence,
152152
work->cli = cli;
153153
mutex_lock(&cli->lock);
154154
list_add_tail(&work->head, &cli->worker);
155-
mutex_unlock(&cli->lock);
156155
if (dma_fence_add_callback(fence, &work->cb, nouveau_cli_work_fence))
157156
nouveau_cli_work_fence(fence, &work->cb);
157+
mutex_unlock(&cli->lock);
158158
}
159159

160160
static void

0 commit comments

Comments
 (0)