> ----- Original Message ----- > From: "Alan Stern" <stern@xxxxxxxxxxxxxxxxxxx> > To: "Erin Teran" <erin_teran@xxxxxxxxxxxxx> > Cc: postme1@xxxxxxx, "USB list" <linux-usb@xxxxxxxxxxxxxxx> > Subject: Re: USB gadget problem with close of a gadgetfs device > Date: Wed, 11 Feb 2009 10:00:53 -0500 (EST) > > > 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? > Well thank you for your time. I will give it a try there and keep modifying my app. Regards, Erin > Alan Stern > = -- Powered by Outblaze -- 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