diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-01-09 07:44:50 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-01-09 07:49:21 -0500 |
commit | 55ba70c40661b61f98c4188c428f265009af1aa5 (patch) | |
tree | 69055d80f453910904969bc441f4d0d7e78b05d0 /drivers/gpu | |
parent | b5215ef1a877cd81a2558f3ddbcf784671a27588 (diff) |
drm/radeon: use after free in radeon_vm_bo_add()
"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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 8597d2c016e6..a97baf5c114f 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -494,10 +494,10 @@ int radeon_vm_bo_add(struct radeon_device *rdev, | |||
494 | } | 494 | } |
495 | if (bo_va->soffset >= tmp->soffset && bo_va->soffset < tmp->eoffset) { | 495 | if (bo_va->soffset >= tmp->soffset && bo_va->soffset < tmp->eoffset) { |
496 | /* bo and tmp overlap, invalid offset */ | 496 | /* bo and tmp overlap, invalid offset */ |
497 | kfree(bo_va); | ||
498 | dev_err(rdev->dev, "bo %p va 0x%08X conflict with (bo %p 0x%08X 0x%08X)\n", | 497 | dev_err(rdev->dev, "bo %p va 0x%08X conflict with (bo %p 0x%08X 0x%08X)\n", |
499 | bo, (unsigned)bo_va->soffset, tmp->bo, | 498 | bo, (unsigned)bo_va->soffset, tmp->bo, |
500 | (unsigned)tmp->soffset, (unsigned)tmp->eoffset); | 499 | (unsigned)tmp->soffset, (unsigned)tmp->eoffset); |
500 | kfree(bo_va); | ||
501 | mutex_unlock(&vm->mutex); | 501 | mutex_unlock(&vm->mutex); |
502 | return -EINVAL; | 502 | return -EINVAL; |
503 | } | 503 | } |