Skip to content

Commit

Permalink
drm/radeon: fix VA range check
Browse files Browse the repository at this point in the history
The end offset is exclusive not inclusive.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
  • Loading branch information
Christian König authored and Alex Deucher committed Sep 20, 2012
1 parent 1678dbc commit a36e70b
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 @@ -732,7 +732,7 @@ int radeon_vm_bo_add(struct radeon_device *rdev,
head = &vm->va;
last_offset = 0;
list_for_each_entry(tmp, &vm->va, vm_list) {
if (bo_va->soffset >= last_offset && bo_va->eoffset < tmp->soffset) {
if (bo_va->soffset >= last_offset && bo_va->eoffset <= tmp->soffset) {
/* bo can be added before this one */
break;
}
Expand Down

0 comments on commit a36e70b

Please sign in to comment.