diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-10-14 15:25:29 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-10-15 02:10:36 +0200 |
commit | 01b4e71f7ad5a4b56d489bcff9bf4e041e540748 (patch) | |
tree | ec2314cfebaeadc3074146f80a431b3451c3f47f /pasta.c | |
parent | 672a8cd80ef2a8491901c50757f0f85464550ff4 (diff) | |
download | passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar.gz passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar.bz2 passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar.lz passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar.xz passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.tar.zst passt-01b4e71f7ad5a4b56d489bcff9bf4e041e540748.zip |
pasta_start_ns() always ends in parent context
The end of pasta_start_ns() has a test against pasta_child_pid, testing
if we're in the parent or the child. However we started the child running
the pasta_setup_ns function which always exec()s or exit()s, so if we
return from the clone() we are always in the parent, making that test
unnecessary.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'pasta.c')
-rw-r--r-- | pasta.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -226,10 +226,7 @@ void pasta_start_ns(struct ctx *c, int argc, char *argv[]) drop_caps(); - if (pasta_child_pid) { - NS_CALL(pasta_wait_for_ns, c); - return; - } + NS_CALL(pasta_wait_for_ns, c); } /** |