public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BUG: Problem with your patches for sysfs from 2 weeks ago
@ 2004-03-27 22:25 Alan Stern
  2004-03-29  6:53 ` Maneesh Soni
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2004-03-27 22:25 UTC (permalink / raw)
  To: Maneesh Soni; +Cc: Kernel development list

Maneesh:

I've been tracing a problem with sysfs that starting showing up just
recently, and it seems likely to have originated with your patches from a
couple of weeks ago.  I can't tell exactly what's wrong or fix it because
I don't understand the filesystem layer well enough.

The problem I found (there may be others) shows up when trying to delete a 
nonexistent symlink -- presumably trying to delete a nonexistent file 
would have a similar result.  The code in sysfs_hash_and_remove() does a 
lookup on the nonexistent name and sysfs_get_dentry() returns a 
newly-allocated dentry.  Creating the new entry increments the parent 
directory's d_count, of course.  But at the end of the routine, when 
dput() is called for the new dentry, the parent's d_count does _not_ get 
decremented.  The new dentry is placed on the dentry_unused list and the 
parent is left with an anomalously large d_count.  This doesn't ever seem 
to get resolved, and when the directory's kobject is deleted the reference 
you added doesn't get dropped.

Alan Stern


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-29 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-27 22:25 BUG: Problem with your patches for sysfs from 2 weeks ago Alan Stern
2004-03-29  6:53 ` Maneesh Soni
2004-03-29 21:04   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox