Re: BUG on unloading the fuse module

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Miklos Szeredi
Date: Friday, October 5, 2007 - 2:37 am

> In 2.6.23-rc8-mm2, the fuse module always bugs on unloading.

It's fixed in Greg's patch queue.

This patch against -mm will also fix it.

Thanks,
Miklos
---

Index: linux/lib/kobject.c
===================================================================
--- linux.orig/lib/kobject.c	2007-10-02 17:20:04.000000000 +0200
+++ linux/lib/kobject.c	2007-10-03 13:58:42.000000000 +0200
@@ -498,18 +498,17 @@ void kobject_cleanup(struct kobject * ko
 	struct kobj_type * t = get_ktype(kobj);
 	struct kset * s = kobj->kset;
 	struct kobject * parent = kobj->parent;
-	const char *k_name = kobj->k_name;
 
 	pr_debug("kobject %s: cleaning up\n",kobject_name(kobj));
-	kobj->k_name = NULL;
-	if (t && t->release)
+	if (t && t->release) {
 		t->release(kobj);
-	else
+		kfree(kobj->k_name);
+		kobj->k_name = NULL;
+	} else
 		pr_debug("kobject '%s' does not have a release() function, "
 			"if this is not a directory kobject, it is broken "
 			"and must be fixed.\n",
-			k_name);
-	kfree(k_name);
+			kobj->k_name);
 	if (s)
 		kset_put(s);
 	kobject_put(parent);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
BUG on unloading the fuse module, Fengguang Wu, (Fri Oct 5, 1:55 am)
Re: BUG on unloading the fuse module, Miklos Szeredi, (Fri Oct 5, 2:37 am)
Re: BUG on unloading the fuse module, Fengguang Wu, (Fri Oct 5, 3:44 am)
Re: BUG on unloading the fuse module, Miklos Szeredi, (Fri Oct 5, 3:54 am)
Re: BUG on unloading the fuse module, Fengguang Wu, (Fri Oct 5, 4:01 am)
Re: BUG on unloading the fuse module, Miklos Szeredi, (Fri Oct 5, 4:33 am)
Re: BUG on unloading the fuse module, Fengguang Wu, (Fri Oct 5, 4:35 am)
Re: BUG on unloading the fuse module, Greg KH, (Fri Oct 5, 8:22 am)