From: Lai Jiangshan Date: Thu, 8 Jan 2009 02:07:45 +0000 (-0800) Subject: devcgroup: use list_for_each_entry_rcu() X-Git-Tag: firefly_0821_release~16042 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=116e05751285c20edf5768ca3bcc00dad86181bb;p=firefly-linux-kernel-4.4.55.git devcgroup: use list_for_each_entry_rcu() We should use list_for_each_entry_rcu in RCU read site. Signed-off-by: Lai Jiangshan Cc: Paul Menage Cc: KAMEZAWA Hiroyuki Cc: Pavel Emelyanov Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 5ba78701adc3..cd377b9082b5 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))