Skip to content

Commit

Permalink
drm/radeon: use after free in radeon_vm_bo_add()
Browse files Browse the repository at this point in the history
"bo_va" is dereferenced in the error message.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed Jan 9, 2012
1 parent b5215ef commit 55ba70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 55ba70c

Please sign in to comment.