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
| ||
|
Date: Thu, 7 Jan 2016 20:38:57 +0800 From: wanghaibin <wanghaibin.wang@...wei.com> To: <linux-kernel@...r.kernel.org> CC: <tj@...nel.org>, <jiangshanlai@...il.com>, <peter.huangpeng@...wei.com>, wanghaibin <wanghaibin.wang@...wei.com> Subject: [RFC PATCH 2/4] workqueue: free the allocated memory resource when wq_numa_init failed. Before the return that wq_numa_init failed, it will be bettet to free the numa node table to avoid the memory leaks. Signed-off-by: wanghaibin <wanghaibin.wang@...wei.com> --- kernel/workqueue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index d6cbe3d..60e192c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5195,6 +5195,10 @@ static void __init wq_numa_init(void) for_each_possible_cpu(cpu) { node = cpu_to_node(cpu); if (WARN_ON(node == NUMA_NO_NODE)) { + for_each_node(node) + free_cpumask_var(tbl[node]); + kfree(tbl); + pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu); /* happens iff arch is bonkers, let's just proceed */ return; -- 1.8.3.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