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  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]
Date:	Wed, 4 Mar 2009 09:59:20 +0530
From:	Bharata B Rao <bharata@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
	Paul Menage <menage@...gle.com>, Li Zefan <lizf@...fujitsu.com>
Subject: [PATCH mmotm] cgroup: remove rcu_read_lock() from css_get_next()

cgroup: remove rcu_read_lock() from css_get_next()

Callers of css_get_next() are already calling css_get_next()
under rcu_read_lock() and hence there there is no need for
css_get_next() to re-acquire rcu_read_lock(). As per the
comments in css_get_next(), let the callers accquire the
rcu_read_lock().

Signed-off-by: Bharata B Rao <bharata@...ux.vnet.ibm.com>
---
 kernel/cgroup.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3553,7 +3553,6 @@ css_get_next(struct cgroup_subsys *ss, i
 		return NULL;
 
 	BUG_ON(!ss->use_id);
-	rcu_read_lock();
 	/* fill start point for scan */
 	tmpid = id;
 	while (1) {
@@ -3577,8 +3576,6 @@ css_get_next(struct cgroup_subsys *ss, i
 		/* continue to scan from next id */
 		tmpid = tmpid + 1;
 	}
-
-	rcu_read_unlock();
 	return ret;
 }
 
Regards,
Bharata.
--
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