lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectGem GTT mmaps..
Jesse,

I have some concerns about the GEM GTT mmap functionality.

First, a gem object pointer is copied to map->offset and then to the
vma->vm_private_data without proper reference counting. This pointer is
used in i915_gem_fault() to access the gem object. However if the gem
object is destroyed and a process then tries to access data in a vma
mapping the (now destroyed) object, it would dereference a stale pointer
into kernel space? Shouldn't those pointers be reference counted, and to
account for fork(), a vm open and close would be needed to reference
count corresponding pointers of newly created and destroyed vmas?

Second, the i915_gem_fault method returns VM_FAULT_SIGBUS if
vm_insert_pfn() fails with an -EBUSY. I think that's an error, since
that would indicate that the pte was already populated by a racing thread.

/Thomas






\
 
 \ /
  Last update: 2009-02-04 23:35    [W:0.046 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site