]> git.hungrycats.org Git - linux/commitdiff
drm/nouveau: hold mutex when calling nouveau_abi16_fini()
authorKamil Dudka <kdudka@redhat.com>
Wed, 15 Jul 2015 15:18:15 +0000 (17:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:59 +0000 (12:21 -0700)
commit ac8c79304280da6ef05c348a9da03ab04898b994 upstream.

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

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nouveau_drm.c

index 89049335b7383a12749e3d0e2f55f00be81598d4..cd6dae08175e46916c429c15ed5ed1c7b176191c 100644 (file)
@@ -863,8 +863,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);