Re: USB gadget problem with close of a gadgetfs device

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

 



On Wed, 11 Feb 2009, Erin Teran wrote:

> > It probably gets incremented when a process forks or clones itself.
> > The only way to find out for sure is to search through the kernel
> > source for occurrences of f_count.
> 
> I feared that would be the answer ;). 
> Better asume the application is doing things wrong than start browsing the kernel for days.

You might find the answer more quickly by looking through the kernel.  
"grep -r" is your friend...

> > > So it seems I have to find a missing open fd.
> > 
> > Yes.
> 
> Well, nothing new here. I cant find the missing fd.
> There is no forking or cloning in my code. 
> The only way I can see that an aditional reference to the fd is created is the poll() call.
> If poll() does a dup of the fd provided it increases the reference count in the kernel.
> Shouldn't this duped fd be freed again after leaving the poll() system call?
> I'm kinda lost here.

I know almost nothing about the filesystem layer.  You're probably 
better off asking people who are more familiar with it.  Why not post a 
message on LKML?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux