summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_release.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-03 19:01:28 +0400
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-03 19:09:12 +0400
commitb75402c9f98a431ae352a223153825513eac9600 (patch)
tree1e763cb871822fb154e5e793c726ced04263b33a /drivers/gpu/drm/qxl/qxl_release.c
parentd7e4d671369263381dd3a02e1f240f675be6b1f5 (diff)
downloadlinux-b75402c9f98a431ae352a223153825513eac9600.tar.xz
drm/qxl: fix gaping memory hole
This is how you implement a memory sieve in a driver. ;-) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_release.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_release.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
index 828d47e90dce..29ab4ec44c40 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -162,12 +162,14 @@ static void
qxl_release_free_list(struct qxl_release *release)
{
while (!list_empty(&release->bos)) {
- struct ttm_validate_buffer *entry;
+ struct qxl_bo_list *entry;
+ struct qxl_bo *bo;
entry = container_of(release->bos.next,
- struct ttm_validate_buffer, head);
-
- list_del(&entry->head);
+ struct qxl_bo_list, tv.head);
+ bo = to_qxl_bo(entry->tv.bo);
+ qxl_bo_unref(&bo);
+ list_del(&entry->tv.head);
kfree(entry);
}
}