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>] [day] [month] [year] [list]
Date:   Mon, 6 Aug 2018 09:20:39 +0800
From:   Yi Wang <wang.yi59@....com.cn>
To:     tj@...nel.org
Cc:     jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
        jiang.biao2@....com.cn, wang.yi59@....com.cn,
        zhong.weidong@....com.cn
Subject: [PATCH] workqueue: fix memory leak in wq_numa_init()

The 'tbl' variable may leak when return in function
wq_numa_init(), and this patch fixes this.

Signed-off-by: Yi Wang <wang.yi59@....com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@....com.cn>
---
 kernel/workqueue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 78b1920..9321a05 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5649,6 +5649,7 @@ static void __init wq_numa_init(void)
 		node = cpu_to_node(cpu);
 		if (WARN_ON(node == NUMA_NO_NODE)) {
 			pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
+			kfree(tbl);
 			/* happens iff arch is bonkers, let's just proceed */
 			return;
 		}
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ