All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] devcgroup: use list_for_each_entry_rcu()
@ 2008-11-21  8:49 Lai Jiangshan
  0 siblings, 0 replies; 2+ messages in thread
From: Lai Jiangshan @ 2008-11-21  8:49 UTC (permalink / raw)
  To: Andrew Morton, Paul Menage, Linux Kernel Mailing List,
	Linux Containers, Serge Hallyn

we should use list_for_each_entry_rcu in RCU read site.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 5ba7870..cd377b9 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -517,7 +517,7 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
 
 	dev_cgroup = task_devcgroup(current);
 
-	list_for_each_entry(wh, &dev_cgroup->whitelist, list) {
+	list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) {
 		if (wh->type & DEV_ALL)
 			goto acc_check;
 		if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode))


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH] devcgroup: use list_for_each_entry_rcu()
@ 2008-11-21  8:49 Lai Jiangshan
  0 siblings, 0 replies; 2+ messages in thread
From: Lai Jiangshan @ 2008-11-21  8:49 UTC (permalink / raw)
  To: Andrew Morton, Paul Menage, Linux Kernel Mailing List,
	Linux Containers

we should use list_for_each_entry_rcu in RCU read site.

Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 5ba7870..cd377b9 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -517,7 +517,7 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
 
 	dev_cgroup = task_devcgroup(current);
 
-	list_for_each_entry(wh, &dev_cgroup->whitelist, list) {
+	list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) {
 		if (wh->type & DEV_ALL)
 			goto acc_check;
 		if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-21  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21  8:49 [PATCH] devcgroup: use list_for_each_entry_rcu() Lai Jiangshan
  -- strict thread matches above, loose matches on Subject: below --
2008-11-21  8:49 Lai Jiangshan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.