nspawn: fix barriers when wiping fully visible procfs/sysfs
authorLennart Poettering <lennart@poettering.net>
Tue, 31 Oct 2023 14:30:12 +0000 (15:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 31 Oct 2023 14:33:49 +0000 (15:33 +0100)
commit1a8d781495c91c3bf62bf87190af4470a44ba8a5
tree9c1f5f8c64c336ab3b637faf9b3facb210dd970d
parent553a596ad96da1588fac0887baea39334428f76c
nspawn: fix barriers when wiping fully visible procfs/sysfs

Let's wait until the child is fully done with mounting it's own
instances of procfs/sysfs before we destroy our fully visible copies of
it.

This borrows heavily from Christian Brauners fix #29521, but splits the
place + sync into two steps so that the child payload is not started
before the parent has destroyed the procfs instance.

Alternative to: #29521
Fixes: #28157
src/nspawn/nspawn.c