diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-01-15 12:27:20 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-01-15 12:27:20 -0500 |
commit | c0106d72b8d71696dbe9dc80e2c77d4ac63f7531 (patch) | |
tree | ca96d2baecb0555e36219ed6968dc8e306e530ca /security/device_cgroup.c | |
parent | 5852973c129cf7c7e6c229abb7250673fc2a50c9 (diff) | |
parent | eff317d0834ad1ff03f747f6bc2d76b9a9c95160 (diff) |
Merge branch 'topic/asoc' into next/asoc
Diffstat (limited to 'security/device_cgroup.c')
-rw-r--r-- | security/device_cgroup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 5ba78701adc3..3aacd0fe7179 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -513,11 +513,14 @@ int devcgroup_inode_mknod(int mode, dev_t dev) | |||
513 | struct dev_cgroup *dev_cgroup; | 513 | struct dev_cgroup *dev_cgroup; |
514 | struct dev_whitelist_item *wh; | 514 | struct dev_whitelist_item *wh; |
515 | 515 | ||
516 | if (!S_ISBLK(mode) && !S_ISCHR(mode)) | ||
517 | return 0; | ||
518 | |||
516 | rcu_read_lock(); | 519 | rcu_read_lock(); |
517 | 520 | ||
518 | dev_cgroup = task_devcgroup(current); | 521 | dev_cgroup = task_devcgroup(current); |
519 | 522 | ||
520 | list_for_each_entry(wh, &dev_cgroup->whitelist, list) { | 523 | list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) { |
521 | if (wh->type & DEV_ALL) | 524 | if (wh->type & DEV_ALL) |
522 | goto acc_check; | 525 | goto acc_check; |
523 | if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode)) | 526 | if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode)) |