]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/qxl: Fix crash in eviction from qxl_release_fence_buffer_objects
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Wed, 3 Sep 2014 15:02:44 +0000 (17:02 +0200)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Wed, 3 Sep 2014 15:09:13 +0000 (17:09 +0200)
This crash was already here before the conversion, but qxl never leaked
hard enough to hit this.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
drivers/gpu/drm/qxl/qxl_release.c

index 29ab4ec44c40569e4da1a8244b4ee4a8504c2879..a6e19c83143e0ce2fba2d97ba1fc37e921f59f41 100644 (file)
@@ -440,7 +440,7 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release)
 
        /* if only one object on the release its the release itself
           since these objects are pinned no need to reserve */
-       if (list_is_singular(&release->bos))
+       if (list_is_singular(&release->bos) || list_empty(&release->bos))
                return;
 
        bo = list_first_entry(&release->bos, struct ttm_validate_buffer, head)->bo;