On Sat, 27 Mar 2004, Greg KH wrote:

> No, I backed Maneesh's patch out, and still get the same hang.
> 
> Alan, were you successful in backing out the sysfs patch and fixing the
> problem?

I reverted the patch and that fixed the particular problem I was looking
at.  But there certainly may be other problems as well.  (I was also
seeing other weird things happening.  Like: attach a SCSI device, rmmod
scsi_mod, modprobe scsi_mod causing an oops in the procfs code.  If you're
interested I may be able to dig up the system log for that tomorrow.  I
don't know if it's related to this problem.)

What exactly are you and Andrew doing to provoke a hang?  It must be 
different from what I was testing.

Maneesh's patch shouldn't just be abandoned, because it does fix a
problem.  What's needed is a safe way to drop a dentry's reference to its
kobject at the time the directory is unlinked even if the dentry itself
isn't released.  Or alternatively, some way to remove the negative dentry
caused by a failed lookup right away so it doesn't pin the reference 
indefinitely.


In principle, of course it's not necessary to release kobjects promptly
when they are unregistered.  When the USB code is fixed, failure to do so
will no longer cause khubd to hang.  The primary disadvantage of not
releasing is that it delays module unloading: So long as some of a
module's kobjects still exist, the module cannot be removed from memory.

Normally these delays are unnoticeable and unimportant.  One case that
_is_ noticeable is when a user process keeps open an attribute file for
one of the module's kobjects.  (That's why I would like to have open
attributes drop their reference to the kobject when the attribute is
unregistered, even though the file remains open -- but it looks like
that's not going to happen.)

However, a very noticeable and IMO unacceptable delay occurs when there's
a reference to a kobject caused by a negative dentry that won't get
recycled until the system decides it's good and ready.  That's the real
problem I wanted to call to people's attention.

Alan Stern




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to