aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom St Denis2015-10-09 11:07:26 -0500
committerAlex Deucher2015-10-22 11:36:38 -0500
commit1a6a8f34a0b17ac03f42bac416e5d289f9c3248f (patch)
tree63c5af3cc14e1a5fdf93e18861dfe0b95ff612c1 /amdgpu/amdgpu_vamgr.c
parent988f31ecc29770a2648bf5c7d7779f1e500c196c (diff)
downloadexternal-libgbm-1a6a8f34a0b17ac03f42bac416e5d289f9c3248f.tar.gz
external-libgbm-1a6a8f34a0b17ac03f42bac416e5d289f9c3248f.tar.xz
external-libgbm-1a6a8f34a0b17ac03f42bac416e5d289f9c3248f.zip
amdgpu: Fix use-after-free bug in vamgr_deinit
This patch fixes a use-after-free bug in the vamgr_deinit function. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_vamgr.c')
-rw-r--r--amdgpu/amdgpu_vamgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index 2221da03..8a707cbc 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -57,8 +57,8 @@ drm_private void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, uint64_t start,
57 57
58drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr) 58drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr)
59{ 59{
60 struct amdgpu_bo_va_hole *hole; 60 struct amdgpu_bo_va_hole *hole, *tmp;
61 LIST_FOR_EACH_ENTRY(hole, &mgr->va_holes, list) { 61 LIST_FOR_EACH_ENTRY_SAFE(hole, tmp, &mgr->va_holes, list) {
62 list_del(&hole->list); 62 list_del(&hole->list);
63 free(hole); 63 free(hole);
64 } 64 }