lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <498A94E0.2080306@intel.com>
Date:	Thu, 05 Feb 2009 15:27:28 +0800
From:	"Zhao, Yu" <yu.zhao@...el.com>
To:	Greg KH <greg@...ah.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	balajirrao@...il.com, laurent.riffard@...e.fr,
	balajirrao@...nmoko.org
Subject: Re: linux-next: Tree for March 7: slab corruptions

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@...e.fr>
Signed-off-by: Balaji Rao <balajirrao@...il.com>
Signed-off-by: Yu Zhao <yu.zhao@...el.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ