On Sun, Mar 09, 2008 at 11:49:26AM +0100, Mikael Pettersson wrote: > Balaji Rao writes: > > Yes the idea works. One more memset is needed in sysdev_register. Here's > the final patch. > > > > diff --git a/drivers/base/sys.c b/drivers/base/sys.c > > index 2f79c55..7c839d9 100644 > > --- a/drivers/base/sys.c > > +++ b/drivers/base/sys.c > > @@ -133,6 +133,7 @@ int sysdev_class_register(struct sysdev_class * cls) > > pr_debug("Registering sysdev class '%s'\n", > > kobject_name(&cls->kset.kobj)); > > INIT_LIST_HEAD(&cls->drivers); > > + memset(&cls->kset.kobj, 0x00, sizeof(struct kobject)); > > cls->kset.kobj.parent = &system_kset->kobj; > > cls->kset.kobj.ktype = &ktype_sysdev_class; > > cls->kset.kobj.kset = system_kset; > > @@ -227,6 +228,7 @@ int sysdev_register(struct sys_device * sysdev) > > > > pr_debug("Registering sys device '%s'\n", > kobject_name(&sysdev->kobj)); > > > > + memset(&sysdev->kobj, 0x00, sizeof(struct kobject)); > > /* Make sure the kset is set */ > > sysdev->kobj.kset = &cls->kset; > > > > Thanks, 2.6.25-rc4 + these two memset()s is finally stable for > me with no warnings, BUG()s, or panics. > > (However, the patch is whitespace damaged with initial tabs > converted to spaces.) > > If you want to pass this on to Linus, you can add a > > Tested-by: Mikael Pettersson <[EMAIL PROTECTED]>
Thanks for testing. greg k-h ------------------------------------------------------------------------- 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 kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel