aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/controllers/devices.txt8
-rw-r--r--security/device_cgroup.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/controllers/devices.txt b/Documentation/controllers/devices.txt
index 4dcea42432c2..7cc6e6a60672 100644
--- a/Documentation/controllers/devices.txt
+++ b/Documentation/controllers/devices.txt
@@ -13,7 +13,7 @@ either an integer or * for all. Access is a composition of r
13The root device cgroup starts with rwm to 'all'. A child device 13The root device cgroup starts with rwm to 'all'. A child device
14cgroup gets a copy of the parent. Administrators can then remove 14cgroup gets a copy of the parent. Administrators can then remove
15devices from the whitelist or add new entries. A child cgroup can 15devices from the whitelist or add new entries. A child cgroup can
16never receive a device access which is denied its parent. However 16never receive a device access which is denied by its parent. However
17when a device access is removed from a parent it will not also be 17when a device access is removed from a parent it will not also be
18removed from the child(ren). 18removed from the child(ren).
19 19
@@ -29,7 +29,11 @@ allows cgroup 1 to read and mknod the device usually known as
29 29
30 echo a > /cgroups/1/devices.deny 30 echo a > /cgroups/1/devices.deny
31 31
32will remove the default 'a *:* mrw' entry. 32will remove the default 'a *:* rwm' entry. Doing
33
34 echo a > /cgroups/1/devices.allow
35
36will add the 'a *:* rwm' entry to the whitelist.
33 37
343. Security 383. Security
35 39
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index baf348834b66..fd764a0858d0 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -382,6 +382,8 @@ static ssize_t devcgroup_access_write(struct cgroup *cgroup, struct cftype *cft,
382 case 'a': 382 case 'a':
383 wh.type = DEV_ALL; 383 wh.type = DEV_ALL;
384 wh.access = ACC_MASK; 384 wh.access = ACC_MASK;
385 wh.major = ~0;
386 wh.minor = ~0;
385 goto handle; 387 goto handle;
386 case 'b': 388 case 'b':
387 wh.type = DEV_BLOCK; 389 wh.type = DEV_BLOCK;