Re: Fw: Re: 2.6.21-rc4-mm1 + 4 hotfixes -- BUG: unable to handle kernel paging request at virtual address 6b6b6ceb -- EIP is at module_put+0x7/0x1f

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 28, 2007 at 01:39:26PM +0800, Shaohua Li wrote:
> On Tue, 2007-03-27 at 22:27 -0700, Greg KH wrote:
> > 
> > Putting more than one kobject in the same structure is a broken design.
> > How can you control the lifetime rules properly if there are two
> > reference counts for the same structure?  It doesn't work.
> > 
> > If you really need something like this, then just use a pointer to a
> > kobject for one of them instead of embedding it.  Why do you need two
> > different kobjects here?
> Our data structure is something like below:
> 
> struct foo {
> 	kobject kobja;
> }
> 
> struct bar {
> 	struct foo foo[];

Ick, don't do that...

> 	kobject kobjb
> }
> 
> kobjb's .release will free struct bar. kobjb is the parent of kobja. if
> you have a reference on kobja, then kobjb can't be released too, right?
> So we only kobjb provide a .release to free the memory, kobja's .release
> isn't required.

Why not just use the "normal" parent/child relationship with the
kobjects like the rest of the kernel does?

thanks,

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

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux