On Thu, 1 Apr 2004, Maneesh Soni wrote:

> On Wed, Mar 31, 2004 at 10:11:37AM -0500, Alan Stern wrote:
> > 
> > Here's a suggestion.  At the start of check_perm() grab the dentry 
> > semaphore, then check whether d_fsdata is NULL, if it isn't then do the 
> > kobject_get(), then unlock the semaphore.
> > 
> 
> I have tried this with no luck. I still get 
> (Badness in kobject_get at lib/kobject.c:42) which means it is not correct fix.

Did you remember to set dentry->d_fsdata to NULL?  This has to be done in
sysfs_remove_dir() sometime during the period when dentry->d_inode->i_sem
is held.  Right now the pointer to the kobject never gets erased.  That 
Badness message is an indication that you are using a valid pointer to a 
kobject whose refcount is 0.

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