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-next>] [day] [month] [year] [list]
Message-ID: <1477996905-16920-1-git-send-email-songjun.wu@microchip.com>
Date:   Tue, 1 Nov 2016 18:41:44 +0800
From:   Songjun Wu <songjun.wu@...rochip.com>
To:     <gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>
CC:     Songjun Wu <songjun.wu@...rochip.com>
Subject: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup

If state_initialized is not set to 0 when a kobject is
released, a device is registered, unregistered, and
registered again, the error below will occur.

kobject (dec04bb0): tried to init an initialized object,
something is seriously wrong.

Signed-off-by: Songjun Wu <songjun.wu@...rochip.com>
---

 lib/kobject.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/kobject.c b/lib/kobject.c
index 445dcae..423af4e 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -639,6 +639,8 @@ static void kobject_cleanup(struct kobject *kobj)
 		kobject_del(kobj);
 	}
 
+	kobj->state_initialized = 0;
+
 	if (t && t->release) {
 		pr_debug("kobject: '%s' (%p): calling ktype release\n",
 			 kobject_name(kobj), kobj);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ