devcgroup: use list_for_each_entry_rcu()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Thu, 8 Jan 2009 02:07:45 +0000 (18:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jan 2009 16:31:03 +0000 (08:31 -0800)
We should use list_for_each_entry_rcu in RCU read site.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/device_cgroup.c

index 5ba78701adc3ab868079ee180b1fc2e4ffc3b95f..cd377b9082b5ec088ce7b68da7f3b83feeda2c92 100644 (file)
@@ -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))