From: topimiettinen Date: Sat, 14 May 2016 16:46:23 +0000 (+0000) Subject: namespace: unmount old /dev under our new private /dev (#3254) X-Git-Tag: v230~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e5f825280192be429cc79153235d12778427fae;p=thirdparty%2Fsystemd.git namespace: unmount old /dev under our new private /dev (#3254) Drop all dangling old /dev mounts before mounting a new private /dev tree. --- diff --git a/src/core/namespace.c b/src/core/namespace.c index b573f008b91..ef85bfec237 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -237,6 +237,8 @@ static int mount_dev(BindMount *m) { */ (void) mkdir_p_label(m->path, 0755); + /* Unmount everything in old /dev */ + umount_recursive(m->path, 0); if (mount(dev, m->path, NULL, MS_MOVE, NULL) < 0) { r = -errno; goto fail;