This is a note to let you know that I've just added the patch titled
Subject: kobjects: mark cleaned up kobjects as unitialized
to my gregkh-2.6 tree. Its filename is
patches/driver-core/kobjects-mark-cleaned-up-kobjects-as-unitialized.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [EMAIL PROTECTED] Thu Mar 6 10:19:32 2008
From: Balaji Rao <[EMAIL PROTECTED]>
Date: Thu, 6 Mar 2008 22:23:18 +0530
Subject: kobjects: mark cleaned up kobjects as unitialized
To: [EMAIL PROTECTED]
Cc: <[email protected]>, [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Disposition: inline
When I remove only the kvm-intel module without removing the kvm module
itself, I get an error saying that a kobject is trying to be
reinitialized. Its because of the fact that kvm reuses a kobject in
kvm_init when calling sysdev_register.
This patch fixes kobject_cleanup by marking the kobject as uninitialized
when we cleanup to allow kobjects to be reused.
Signed-off-by: Balaji Rao <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
lib/kobject.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -566,6 +566,13 @@ static void kobject_cleanup(struct kobje
kobject_del(kobj);
}
+ /* set the states incase someone tries to use this object again */
+ kobj->state_initialized = 0;
+ kobj->state_in_sysfs = 0;
+ kobj->state_add_uevent_sent = 0;
+ kobj->state_remove_uevent_sent = 0;
+ kobj->state_initialized = 0;
+
if (t && t->release) {
pr_debug("kobject: '%s' (%p): calling ktype release\n",
kobject_name(kobj), kobj);
Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are
driver-core/kobjects-mark-cleaned-up-kobjects-as-unitialized.patch
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel