]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/device_cgroup.c
OMAP: dmtimer: enable all timers to be wakeup events
[linux-2.6-omap-h63xx.git] / security / device_cgroup.c
index 5ba78701adc3ab868079ee180b1fc2e4ffc3b95f..3aacd0fe7179b26a4e08bc7bce343dd7fbadc239 100644 (file)
@@ -513,11 +513,14 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
        struct dev_cgroup *dev_cgroup;
        struct dev_whitelist_item *wh;
 
+       if (!S_ISBLK(mode) && !S_ISCHR(mode))
+               return 0;
+
        rcu_read_lock();
 
        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))