提交 55ba70c4 编写于 作者: D Dan Carpenter 提交者: Dave Airlie

drm/radeon: use after free in radeon_vm_bo_add()

"bo_va" is dereferenced in the error message.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 b5215ef1
......@@ -494,10 +494,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册