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]
Message-ID: <20200916112342.25790-1-yanfei.xu@windriver.com>
Date:   Wed, 16 Sep 2020 19:23:42 +0800
From:   <yanfei.xu@...driver.com>
To:     <lizefan@...wei.com>, <tj@...nel.org>, <hannes@...xchg.org>
CC:     <cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] cpuset: Move node_isset() outside of the rcu_read region

From: Yanfei Xu <yanfei.xu@...driver.com>

It's no need to keep node_isset still in rcu_read region, just move
it outside of the rcu_read region.

Signed-off-by: Yanfei Xu <yanfei.xu@...driver.com>
---
 kernel/cgroup/cpuset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 642415b8c3c9..51d51ed97deb 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3443,9 +3443,9 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask)
 
 	rcu_read_lock();
 	cs = nearest_hardwall_ancestor(task_cs(current));
-	allowed = node_isset(node, cs->mems_allowed);
 	rcu_read_unlock();
 
+	allowed = node_isset(node, cs->mems_allowed);
 	spin_unlock_irqrestore(&callback_lock, flags);
 	return allowed;
 }
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ