Re: [RFC v1] drm: add reference count of gem object name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 1, 2012 at 3:26 AM, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
> As you know, when the handle is closed, the flink name is also released even
> though another process opened the flink name to get its own handle.
> So the flink name becomes invalid. This is the issue I pointed out and this
> is the fixup this patch tries to do.
> I think flink name should have dependency of the gem object rather than
> process.
> In other words, gem flink name couldn't be used as global key becasue it
> can't gurantee that the fink name is pointing to same gem object.
> This patch makes the gem flink name valid as long as the gem object isn't
> released instead of handle.
> And this is the reason that we need this patch.

Like I've said, as long as there's a userspace handle around, the
flink name should not disappear. This additional handle reference
count is implemented with obj->handle_count, which is incremented in
drm_gem_handle_create. This function is called both from flink and
from open ioctls. And that reference is dropped again in
drm_gem_object_release_handle and the two
drm_gem_object_handle_unreference variants.

So I guess there's a bug somewhere, so can you please provide a
minimal testcase which showcases your issue?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux