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: <20221020030035.30075-1-shangxiaojing@huawei.com>
Date:   Thu, 20 Oct 2022 11:00:35 +0800
From:   Shang XiaoJing <shangxiaojing@...wei.com>
To:     <bongsu.jeon@...sung.com>, <krzysztof.kozlowski@...aro.org>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>
CC:     <shangxiaojing@...wei.com>
Subject: [PATCH] mm/slub: Fix memory leak in sysfs_slab_add()

From: Liu Shixin <liushixin2@...wei.com>

temporary scheme

Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
 mm/slub.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mm/slub.c b/mm/slub.c
index 4b98dff9be8e..3e19320aa162 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5980,6 +5980,10 @@ static int sysfs_slab_add(struct kmem_cache *s)
 out:
 	if (!unmergeable)
 		kfree(name);
+	if (err && s->kobj.name) {
+		pr_err("need free kobject.name\n");
+		kfree_const(s->kobj.name);
+	}
 	return err;
 out_del_kobj:
 	kobject_del(&s->kobj);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ