Is there a to prevent a file descriptor being closed

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

 



Hello

   I am writing a driver to operation with the dma-buf, a problem I meet 
is that a dma-buf maybe closed by the other driver or userspace 
application, then the same number of the file descriptor will be 
assigned with the other thing, its private data is different. I watch 
what the drm system do. The drm system doesn't use the file descriptor 
but the its private data (from dma_buf_get()) to check whether it is the 
same buffer.

   Is there a reference in the file descriptor? And is there a way  to 
increase the reference to a file descriptor.

   I have designed a way to track the usage of the dma-buf of my driver, 
there is not a problem for the driver to release them. But I just want 
the new dma-buf is assigned with new file descriptor number, not re-use 
the closed one.

   Thank you.


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux