]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/posix-process: Ignore CLONE_VM when assigning tls parameter
authorMichalis Pappas <michalis@unikraft.io>
Mon, 7 Apr 2025 09:10:22 +0000 (11:10 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Wed, 30 Apr 2025 09:42:51 +0000 (09:42 +0000)
commitbcf8fd63d4f2586c2638c8dfee825a62f8de2602
tree9f111a259335369ed0c1b6a6b26e8229f4aeb88e
parent62c6bdddf72ae8451102ae28d7256dea314a6ce4
lib/posix-process: Ignore CLONE_VM when assigning tls parameter

The interpretation of the tls parameter of clone() is conditional to
passing CLONE_SETTLS in flags. Fix a bug where CLONE_VM would result
into assigning the tls parameter to child. Assigning the parent's tls
when CLONE_VFORK is set, is performed in clone_setup_child_ctx(),
conditionally that the child's tls is not already set, presumably due
to CLONE_SETTLS.

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: #1627
lib/posix-process/clone.c