drm/radeon: use after free in radeon_vm_bo_add()
Subsystems (3)
PATCH 1/2 drm/radeon: use after free in radeon_vm_bo_add()
"bo_va" is dereferenced in the error message.
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/radeon/radeon_gart.c +1 -1
@@ -486,10 +486,10 @@ int radeon_vm_bo_add(struct radeon_device *rdev, }if (bo_va->soffset >= tmp->soffset && bo_va->soffset < tmp->eoffset) {/* bo and tmp overlap, invalid offset */ -kfree (bo_va);dev_err (rdev->dev,"bo %p va 0x%08X conflict with (bo %p 0x%08X 0x%08X)\n" , bo, (unsigned )bo_va->soffset, tmp->bo, (unsigned )tmp->soffset, (unsigned )tmp->eoffset); +kfree (bo_va);mutex_unlock (&vm->mutex);return -EINVAL ; }
Quoted 3 lines · Dan Carpenter
"
bo_va" is dereferenced in the error message.Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 17 lines
drivers/gpu/drm/radeon/radeon_gart.c +1
-1@@ -486,10 +486,10 @@ int radeon_vm_bo_add(struct radeon_device *rdev, } if (bo_va->soffset >= tmp->soffset && bo_va->soffset < tmp->eoffset) { /* bo and tmp overlap, invalid offset */ - kfree(bo_va); dev_err(rdev->dev, "bo %p va 0x%08X conflict with (bo %p 0x%08X 0x%08X)\n", bo, (unsigned)bo_va->soffset, tmp->bo, (unsigned)tmp->soffset, (unsigned)tmp->eoffset); + kfree(bo_va); mutex_unlock(&vm->mutex); return -EINVAL; }
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html