From: <gregkh@suse.de>
To: balajirrao@gmail.com, gregkh@suse.de, kvm-devel@lists.sourceforge.net
Subject: patch patches/driver-core/kobjects-mark-cleaned-up-kobjects-as-unitialized.patch added to gregkh-2.6 tree
Date: Sat, 08 Mar 2008 20:58:33 -0800 [thread overview]
Message-ID: <12050387122383@kroah.org> (raw)
In-Reply-To: <200803062223.18857.balajirrao@gmail.com>
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 balajirrao@gmail.com Thu Mar 6 10:19:32 2008
From: Balaji Rao <balajirrao@gmail.com>
Date: Thu, 6 Mar 2008 22:23:18 +0530
Subject: kobjects: mark cleaned up kobjects as unitialized
To: gregkh@suse.de
Cc: <kvm-devel@lists.sourceforge.net>, linux-kernel@vger.kernel.org
Message-ID: <200803062223.18857.balajirrao@gmail.com>
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 <balajirrao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
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 balajirrao@gmail.com 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/
prev parent reply other threads:[~2008-03-09 4:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 16:53 [PATCH] Mark kobjects as unitialized Balaji Rao
2008-03-06 16:53 ` Balaji Rao
2008-03-06 17:05 ` Greg KH
2008-03-06 17:05 ` Greg KH
2008-03-06 17:50 ` Balaji Rao
2008-03-06 17:50 ` Balaji Rao
2008-03-06 18:05 ` Greg KH
2008-03-06 18:05 ` Greg KH
2008-03-07 8:56 ` [kvm-devel] " Avi Kivity
2008-03-07 8:56 ` Avi Kivity
2008-03-08 22:07 ` Balaji Rao
2008-03-09 5:06 ` Greg KH
2008-03-09 5:06 ` Greg KH
2008-03-09 6:16 ` Greg KH
2008-03-09 6:16 ` Greg KH
2008-03-09 6:17 ` Balaji Rao
2008-03-09 6:17 ` Balaji Rao
2008-03-09 6:33 ` Greg KH
2008-03-09 6:33 ` Greg KH
2008-03-09 6:36 ` Balaji Rao
2008-03-09 6:36 ` Balaji Rao
2008-03-09 7:03 ` Greg KH
2008-03-09 7:03 ` Greg KH
2008-03-09 7:21 ` Balaji Rao
2008-03-09 7:21 ` Balaji Rao
2008-03-09 10:49 ` Mikael Pettersson
2008-03-09 10:49 ` Mikael Pettersson
2008-03-10 17:20 ` Greg KH
2008-03-10 17:20 ` Greg KH
2008-03-10 15:52 ` Greg KH
2008-03-10 15:52 ` Greg KH
2008-03-10 16:05 ` Balaji Rao
2008-03-10 16:05 ` Balaji Rao
2008-03-10 17:20 ` Greg KH
2008-03-10 17:20 ` Greg KH
2008-03-06 18:34 ` patch kobjects-mark-cleaned-up-kobjects-as-unitialized.patch added to gregkh-2.6 tree gregkh
2008-03-09 4:58 ` gregkh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12050387122383@kroah.org \
--to=gregkh@suse.de \
--cc=balajirrao@gmail.com \
--cc=kvm-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.