projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91fd896
)
drm/radeon: add extra check in radeon_ttm_tt_unpin_userptr
author
Christian König
<
[email protected]
>
Tue, 31 Mar 2015 15:36:57 +0000
(17:36 +0200)
committer
Alex Deucher
<
[email protected]
>
Thu, 2 Apr 2015 14:03:29 +0000
(10:03 -0400)
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 <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/radeon/radeon_ttm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/radeon/radeon_ttm.c
b/drivers/gpu/drm/radeon/radeon_ttm.c
index d02aa1d0f5885408c877056bd4ac1ab0e1ed6f12..b292aca0f342d53856ec3eaf982b71fd8b0a7fa8 100644
(file)
--- 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);