Commit dddf7c5b by Serge Hallyn

cgfs: also check for EACCES when writing devices

Because that's what lxcfs gives us. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 4f875f70
...@@ -1918,12 +1918,12 @@ static int do_setup_cgroup_limits(struct cgfs_data *d, ...@@ -1918,12 +1918,12 @@ static int do_setup_cgroup_limits(struct cgfs_data *d,
cgroup_devices_has_allow_or_deny(d, cg->value, true)) cgroup_devices_has_allow_or_deny(d, cg->value, true))
continue; continue;
if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) { if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) {
if (do_devices && errno == EPERM) { if (do_devices && (errno == EACCES || errno == EPERM)) {
WARN("Error setting %s to %s for %s", WARN("Error setting %s to %s for %s",
cg->subsystem, cg->value, d->name); cg->subsystem, cg->value, d->name);
continue; continue;
} }
ERROR("Error setting %s to %s for %s", SYSERROR("Error setting %s to %s for %s",
cg->subsystem, cg->value, d->name); cg->subsystem, cg->value, d->name);
goto out; goto out;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment