From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: patch kobjects-mark-cleaned-up-kobjects-as-unitialized.patch added to gregkh-2.6 tree Date: Thu, 06 Mar 2008 10:34:12 -0800 Message-ID: <1204828452583@kroah.org> References: <200803062223.18857.balajirrao@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: balajirrao@gmail.com, gregkh@suse.de, kvm-devel@lists.sourceforge.net Return-path: In-Reply-To: <200803062223.18857.balajirrao@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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 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 Date: Thu, 6 Mar 2008 22:23:18 +0530 Subject: kobjects: mark cleaned up kobjects as unitialized To: gregkh@suse.de Cc: , 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 Signed-off-by: Greg Kroah-Hartman --- lib/kobject.c | 3 +++ 1 file changed, 3 insertions(+) --- a/lib/kobject.c +++ b/lib/kobject.c @@ -629,6 +629,9 @@ static void kobject_cleanup(struct kobje pr_debug("kobject: '%s': free name\n", name); kfree(name); } + + /* Set the state to uninitialized */ + kobj->state_initialized = 0; } static void kobject_release(struct kref *kref) 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/