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: <1452170339-26748-2-git-send-email-wanghaibin.wang@huawei.com>
Date:	Thu, 7 Jan 2016 20:38:56 +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 1/4] workqueue: move the wq_update_unbound_numa_attrs_buf allocation location.

the wq_update_unbound_numa_attrs_buf will be useful, only when the
wq_numa_enabled is true.
if there is something wrong to cause the wq_numa_enable false, it
can just return without the wq_update_unbound_numa_attrs_buf
allocation.

This doesn't introduce any functional changes.

Signed-off-by: wanghaibin <wanghaibin.wang@...wei.com>
---
 kernel/workqueue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c579dba..d6cbe3d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5180,9 +5180,6 @@ static void __init wq_numa_init(void)
 		return;
 	}
 
-	wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL);
-	BUG_ON(!wq_update_unbound_numa_attrs_buf);
-
 	/*
 	 * We want masks of possible CPUs of each node which isn't readily
 	 * available.  Build one from cpu_to_node() which should have been
@@ -5207,6 +5204,9 @@ static void __init wq_numa_init(void)
 
 	wq_numa_possible_cpumask = tbl;
 	wq_numa_enabled = true;
+
+	wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL);
+	BUG_ON(!wq_update_unbound_numa_attrs_buf);
 }
 
 static int __init init_workqueues(void)
-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ