[PATCH] sysfs: sysfs_remove_dir() needs to invalidate the dentry
When calling sysfs_remove_dir() don't allow any further sysfs functions to work for this kobject anymore. This fixes a nasty USB cdc-acm oops on disconnect. Many thanks to Bob Copeland and Paul Fulghum for taking the time to track this down. Cc: Bob Copeland <email@bobcopeland.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Maneesh Soni <maneesh@in.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -302,6 +302,7 @@ void sysfs_remove_dir(struct kobject * kobj)
|
||||
* Drop reference from dget() on entrance.
|
||||
*/
|
||||
dput(dentry);
|
||||
kobj->dentry = NULL;
|
||||
}
|
||||
|
||||
int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
|
||||
|
Reference in New Issue
Block a user