Re: [PATCH] Mark kobjects as unitialized

From: Greg KH
Date: Thu Mar 06 2008 - 12:05:33 EST


On Thu, Mar 06, 2008 at 10:23:18PM +0530, Balaji Rao wrote:
> Hi greg,
>
> 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.

Where exactly in the code does that happen? kobjects should not be
"reused" as that implies that they are static, and not dynamically
allocated, right?

Which kobject is this?

Ugh, is this the sys_device stuff? I hate that code...

> This patch fixes kobject_cleanup by marking the kobject as
> uninitialized when we cleanup to allow kobjects to be reused.

The patch seems correct, but I would like to verify which kobject is
being reused here first.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/