Skip to content

Commit

Permalink
Merge branch 'ttm-fixes-3.13' of git://people.freedesktop.org/~thomas…
Browse files Browse the repository at this point in the history
…h/linux into drm-next

A single ttm vm fix.

* 'ttm-fixes-3.13' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: Fix accesses through vmas with only partial coverage
  • Loading branch information
Dave Airlie committed Dec 16, 2013
2 parents b25b442 + d386735 commit f1cd659
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/ttm/ttm_bo_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
}

page_offset = ((address - vma->vm_start) >> PAGE_SHIFT) +
drm_vma_node_start(&bo->vma_node) - vma->vm_pgoff;
page_last = vma_pages(vma) +
drm_vma_node_start(&bo->vma_node) - vma->vm_pgoff;
vma->vm_pgoff - drm_vma_node_start(&bo->vma_node);
page_last = vma_pages(vma) + vma->vm_pgoff -
drm_vma_node_start(&bo->vma_node);

if (unlikely(page_offset >= bo->num_pages)) {
retval = VM_FAULT_SIGBUS;
Expand Down

0 comments on commit f1cd659

Please sign in to comment.