From: "Zhao, Yu" <yu.zhao@intel.com>
To: Greg KH <greg@kroah.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
balajirrao@gmail.com, laurent.riffard@free.fr,
balajirrao@openmoko.org
Subject: Re: linux-next: Tree for March 7: slab corruptions
Date: Thu, 05 Feb 2009 15:27:28 +0800 [thread overview]
Message-ID: <498A94E0.2080306@intel.com> (raw)
In-Reply-To: <20090205053802.GA8355@kroah.com>
Greg KH wrote:
> On Thu, Feb 05, 2009 at 01:08:51PM +0800, Zhao, Yu wrote:
>> 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.
Tested-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Balaji Rao <balajirrao@gmail.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
---
lib/kobject.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/kobject.c b/lib/kobject.c
index 0487d1f..9f46f4f 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -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",
--
1.6.1
next prev parent reply other threads:[~2009-02-05 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 5:08 linux-next: Tree for March 7: slab corruptions Zhao, Yu
2009-02-05 5:38 ` Greg KH
2009-02-05 7:27 ` Zhao, Yu [this message]
2009-02-05 15:26 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2008-03-07 3:18 linux-next: Tree for March 7 Stephen Rothwell
2008-03-08 10:45 ` linux-next: Tree for March 7: slab corruptions Laurent Riffard
2008-03-08 18:59 ` Balaji Rao
2008-03-09 3:05 ` Greg KH
2008-03-09 8:13 ` Laurent Riffard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=498A94E0.2080306@intel.com \
--to=yu.zhao@intel.com \
--cc=balajirrao@gmail.com \
--cc=balajirrao@openmoko.org \
--cc=greg@kroah.com \
--cc=laurent.riffard@free.fr \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox