Re: netfilter: active obj WARN when cleaning up

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

 



On Mon, Dec 02, 2013 at 04:33:20PM +0000, Christoph Lameter wrote:
> On Wed, 27 Nov 2013, Greg KH wrote:
> 
> > Just make the kobject "dynamic" instead of embedded in struct kmem_cache
> > and all will be fine.  I can't believe this code has been broken for
> > this long.
> 
> The slub code is was designed to use an embedded structure since we
> only get the kobj  pointer passed to us from sysfs. If kobj is not
> embedded then how can we get from the sysfs object to the kmem_cache
> structure from the sysfs callbacks? Sysfs was designed to have embedded
> objects as far as I can recall.

Yes, it's designed to have embedded objects, so then use it that way and
clean up the structure when the kobject goes away.  Don't use a
different reference count for your structure than the one in the kobject
and think that all will be fine.

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]