Linus Torvalds wrote:I'm pretty sure. I've seen dentry blowing up due to early release && compared it with older code. It was my mistake during restructuring error path. The only user of sysfs_move_dir() was S390 Cornelia works on (cc'd). Cornelia is usually very good at spotting and debugging sysfs bugs. Dunno how it got slipped this time. Before dput() bug was introduced, it worked although error handling path was broken. It will fall in infinite loop if old_parent == new_parent and for the question, I suppose so. Cornelia, right? sysfs currently doesn't depend on VFS locking. VFS locking is done just to keep VFS layer happy. sysfs_dirent hierarchy is protected by sysfs_mutex and renaming/moving are protected by sysfs_rename_mutex. As both ops are under rename_mutex, I think the above code just can grab both mutexes in any order. It's probably a remnant of the days when sysfs used VFS locking to protect internal structures. s390 was the only user of the move interface till now and through all the recent sysfs change, it didn't receive enough attention other than Cornelia's testing. Eventually, I think sysfs_rename_dir() and sysfs_move_dir() should be merged into sysfs_move() but for the current two users, I don't see anything wrong with the locking. Thanks. -- tejun --
| Andrew Morton | Re: Linux 2.6.21-rc4 |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Balbir Singh | Re: [RFC][PATCH 2/7] RSS controller core |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Andreas Henriksson | [PATCH 06/12] Remove bogus reference to tc-filters(8) from tc(8) manpage. |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
