瀏覽代碼

drm/nouveau: hold mutex when calling nouveau_abi16_fini()

This was the only access to cli->abi16 without holding the mutex.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Kamil Dudka 10 年之前
父節點
當前提交
ac8c793042
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/gpu/drm/nouveau/nouveau_drm.c

+ 2 - 0
drivers/gpu/drm/nouveau/nouveau_drm.c

@@ -865,8 +865,10 @@ nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv)
 
 	pm_runtime_get_sync(dev->dev);
 
+	mutex_lock(&cli->mutex);
 	if (cli->abi16)
 		nouveau_abi16_fini(cli->abi16);
+	mutex_unlock(&cli->mutex);
 
 	mutex_lock(&drm->client.mutex);
 	list_del(&cli->head);