All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/radeon: add extra check in radeon_ttm_tt_unpin_userptr
@ 2015-03-31 15:36 Christian König
  2015-03-31 15:36 ` [PATCH 2/4] drm/radeon: fix wait in radeon_mn_invalidate_range_start Christian König
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Christian König @ 2015-03-31 15:36 UTC (permalink / raw)
  To: alexdeucher; +Cc: serguei.sagalovitch, dri-devel

From: Christian König <christian.koenig@amd.com>

We somehow try to free the SG table twice.

Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=89734

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: <stable@vger.kernel.org>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index d02aa1d..b292aca 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -598,6 +598,10 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
 	enum dma_data_direction direction = write ?
 		DMA_BIDIRECTIONAL : DMA_TO_DEVICE;
 
+	/* double check that we don't free the table twice */
+	if (!ttm->sg->sgl)
+		return;
+
 	/* free the sg table and pages again */
 	dma_unmap_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction);
 
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-08  9:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 15:36 [PATCH 1/4] drm/radeon: add extra check in radeon_ttm_tt_unpin_userptr Christian König
2015-03-31 15:36 ` [PATCH 2/4] drm/radeon: fix wait in radeon_mn_invalidate_range_start Christian König
2015-03-31 15:36 ` [PATCH 3/4] drm/radeon: add userptr config option Christian König
2015-03-31 15:37 ` [PATCH 4/4] drm/radeon: allow creating overlapping userptrs Christian König
2015-03-31 16:13 ` [PATCH 1/4] drm/radeon: add extra check in radeon_ttm_tt_unpin_userptr Alex Deucher
2015-04-08  9:46   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.