diff options
| author | Maneesh Soni <maneesh@in.ibm.com> | 2004-05-11 02:43:50 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-05-11 02:43:50 -0700 |
| commit | 427ac533882bb6f0a138cce26cfabd8467c081e3 (patch) | |
| tree | 0c30078aa82c91c9ceaa7e586a867fc9f0358b5d /drivers/misc/ibmasm/module.c | |
| parent | 8bcb3f98404202e085120d21fcc6e66eb90677a7 (diff) | |
[PATCH] kobject/sysfs race fix
The following patch fixes the race involved between unregistering a kobject
and simultaneously opeing a corresponding attribute file in sysfs.
Ideally sysfs should take a ref. to the kobject as long as it has dentries
referring to the kobjects, but because of current limitations in
module/kobject ref counting, sysfs's pinning of kobject leads to
hang/delays in rmmod of certain modules. The patch checks for unhashed
dentries in check_perm() while opening a sysfs file. If the dentry is
still hashed then it goes ahead and takes the ref to kobject. This done
under the per dentry lock. It does this in the inline routine
sysfs_get_kobject(dentry).
Diffstat (limited to 'drivers/misc/ibmasm/module.c')
0 files changed, 0 insertions, 0 deletions
