Skip to contentSkip to conversation

linux-next: Tree for March 7: slab corruptions

DISCUSSION Zhao, Yu 2 participants 4 messages Feb 5, 2009

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Yu

Hi Greg,

It looks like following fix is not in Linus' tree. Can you please queue it?

http://lkml.org/lkml/2008/3/8/155

Queue what? That is a message from over a year ago, are you seeing a problem in mainline in this area? If so, do you have a proposed fix for it?

totally confused,

greg k-h

author Tested-by Laurent Riffard
#2 lore raw
Quoted 11 lines · Greg KH
Quoted 5 lines · Yu

Hi Greg,

It looks like following fix is not in Linus' tree. Can you please queue it?

http://lkml.org/lkml/2008/3/8/155

Queue what? That is a message from over a year ago, are you seeing a problem in mainline in this area? If so, do you have a proposed fix for it?

Yes, I'm seeing 'kobject (ffff8800bf03b908): tried to init an initialized object, something is seriously wrong'. The warning is fired when re-initializing a kobject that has been deleted while its state remains `initialized'. Following is the fix.

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

---
lib/kobject.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
lib/kobject.c +0 -0
index 0487d1f..9f46f4f 100644
@@ -540,6 +540,9 @@ static void kobject_cleanup(struct kobject *kobj)
	pr_debug("kobject: '%s' (%p): %s\n",
		 kobject_name(kobj), kobj, __func__);

+ /* set the state to uninitialized */
+ kobj->state_initialized = 0;
+
if (t && !t->release)
pr_debug("kobject: '%s' (%p): does not have a release() "
"function, it is broken and must be fixed.\n",

Signature · 1 line
1.6.1
#3 lore raw
Quoted 8 lines · Yu
Quoted 7 lines · Greg KH
Quoted 6 lines · Yu

Hi Greg,

It looks like following fix is not in Linus' tree. Can you please queue it?

http://lkml.org/lkml/2008/3/8/155

Quoted 8 lines
Quoted 3 lines

Queue what? That is a message from over a year ago, are you seeing a problem in mainline in this area? If so, do you have a proposed fix for it?

Yes, I'm seeing 'kobject (ffff8800bf03b908): tried to init an initialized object, something is seriously wrong'. The warning is fired when re-initializing
a kobject that has been deleted while its state remains `initialized'.

What kobject is causing this to happen?

kobjects should not be static, which it sounds like is the root of your problem here. If they are properly dynamic, this can not happen.

thanks,

greg k-h