diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /security/device_cgroup.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'security/device_cgroup.c')
-rw-r--r-- | security/device_cgroup.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 8d9c48f13774..1be68269e1c2 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -62,8 +62,7 @@ static inline struct dev_cgroup *task_devcgroup(struct task_struct *task) | |||
62 | struct cgroup_subsys devices_subsys; | 62 | struct cgroup_subsys devices_subsys; |
63 | 63 | ||
64 | static int devcgroup_can_attach(struct cgroup_subsys *ss, | 64 | static int devcgroup_can_attach(struct cgroup_subsys *ss, |
65 | struct cgroup *new_cgroup, struct task_struct *task, | 65 | struct cgroup *new_cgroup, struct task_struct *task) |
66 | bool threadgroup) | ||
67 | { | 66 | { |
68 | if (current != task && !capable(CAP_SYS_ADMIN)) | 67 | if (current != task && !capable(CAP_SYS_ADMIN)) |
69 | return -EPERM; | 68 | return -EPERM; |
@@ -475,17 +474,11 @@ struct cgroup_subsys devices_subsys = { | |||
475 | .subsys_id = devices_subsys_id, | 474 | .subsys_id = devices_subsys_id, |
476 | }; | 475 | }; |
477 | 476 | ||
478 | int devcgroup_inode_permission(struct inode *inode, int mask) | 477 | int __devcgroup_inode_permission(struct inode *inode, int mask) |
479 | { | 478 | { |
480 | struct dev_cgroup *dev_cgroup; | 479 | struct dev_cgroup *dev_cgroup; |
481 | struct dev_whitelist_item *wh; | 480 | struct dev_whitelist_item *wh; |
482 | 481 | ||
483 | dev_t device = inode->i_rdev; | ||
484 | if (!device) | ||
485 | return 0; | ||
486 | if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode)) | ||
487 | return 0; | ||
488 | |||
489 | rcu_read_lock(); | 482 | rcu_read_lock(); |
490 | 483 | ||
491 | dev_cgroup = task_devcgroup(current); | 484 | dev_cgroup = task_devcgroup(current); |