aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-10-13 07:48:34 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-10-13 09:19:45 +0200
commited11bb90f0a775e91f9ae64e3be951a47cd642c3 (patch)
tree80b9f6ba013757f744911de34f343ddb0b62967d /executor/common_linux.h
parent118b58e6523ce5a5d9b89c74fe46da8ac0c77d35 (diff)
executor: don't fail on cgroup mounting
On stretch images setup_cgroups fails as: mount(/syzcgroup/net, net) failed: 22 mount(/syzcgroup/net, net_cls) failed: 22 mount(/syzcgroup/net, net_prio) failed: 22 mount(/syzcgroup/net, blkio) failed: 22 SYZFAIL: mount cgroup failed (/syzcgroup/net, devices,freezer): 16 (errno 16: Device or resource busy) It seems that systemd starts messing with these mounts somehow and repeated mounting fails with EBUSY. Don't hard fail on that error.
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 16880d00e..43fb6c2ce 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -3472,8 +3472,12 @@ static void mount_cgroups(const char* dir, const char** controllers, int count)
if (enabled[0] == 0)
return;
// Now mount all at once.
- if (mount("none", dir, "cgroup", 0, enabled + 1))
- failmsg("mount cgroup failed", "(%s, %s): %d\n", dir, enabled + 1, errno);
+ if (mount("none", dir, "cgroup", 0, enabled + 1)) {
+ // In systemd/stretch images this is failing with EBUSY
+ // (systemd starts messing with these mounts?),
+ // so we don't fail, but just log the error.
+ debug("mount(%s, %s) failed: %d\n", dir, enabled + 1, errno);
+ }
if (chmod(dir, 0777)) {
debug("chmod(%s) failed: %d\n", dir, errno);
}