aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/device_cgroup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 4450fbeec41..92e24bb6443 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -202,8 +202,8 @@ static void devcgroup_destroy(struct cgroup_subsys *ss,
dev_cgroup = cgroup_to_devcgroup(cgroup);
list_for_each_entry_safe(wh, tmp, &dev_cgroup->whitelist, list) {
- list_del(&wh->list);
- kfree(wh);
+ list_del_rcu(&wh->list);
+ kfree_rcu(wh, rcu);
}
kfree(dev_cgroup);
}
@@ -278,7 +278,7 @@ static int may_access_whitelist(struct dev_cgroup *c,
{
struct dev_whitelist_item *whitem;
- list_for_each_entry(whitem, &c->whitelist, list) {
+ list_for_each_entry_rcu(whitem, &c->whitelist, list) {
if (whitem->type & DEV_ALL)
return 1;
if ((refwh->type & DEV_BLOCK) && !(whitem->type & DEV_BLOCK))