vfork() sets the CLONE_VM and CLONE_VFORK flags. This triggers an
error in the clone handlers of vfscore as CLONE_FS is not set. Update
the handlers to additionally check against CLONE_VM, as that also
implies that the parent and child share filesystem state.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1386
struct uk_thread *child __unused,
struct uk_thread *parent __unused)
{
- if (unlikely(!(cl_args->flags & CLONE_FILES))) {
+ if (unlikely(!(cl_args->flags & CLONE_FILES) &&
+ !(cl_args->flags & CLONE_VM))) {
uk_pr_warn("CLONE_FILES not set");
return -ENOTSUP;
}
struct uk_thread *child __unused,
struct uk_thread *parent __unused)
{
- if (unlikely(!(cl_args->flags & CLONE_FS))) {
+ if (unlikely(!(cl_args->flags & CLONE_FS) &&
+ !(cl_args->flags & CLONE_VM))) {
uk_pr_warn("Separate filesystem information for children are not supported (CLONE_FS absent)\n");
return -ENOTSUP;
}