summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIván Ezequiel Rodriguez <ivanrwcm25@gmail.com>2026-10-28 12:43:12 -0300
committerCatalin Marinas <catalin.marinas@arm.com>2026-10-29 20:42:22 +0000
commit078e122f3bf000dd45965997b66deac10ee580fa (patch)
tree42344f0ea9c5594fd3a8ca1811a496f1af566f95 /tools
parent486d396b19e93f6e56e0a0ba96c14a9ccc1a5977 (diff)
arm64/gcs: release GCS on failed fork
copy_thread() can map a CLONE_VM GCS and still return 0. A later copy_process() failure calls exit_thread(), but arm64 did not implement it, so the VMA stayed in the parent's mm. Wire HAVE_EXIT_THREAD to gcs_free(). Kernel threads created with CLONE_VM (io_uring and vhost workers) inherit the parent's gcs_base/gcs_size from arch_dup_task_struct() without allocating their own GCS. When such a thread exits, exit_mm() -> mm_release() -> deactivate_mm() -> gcs_free() unmaps the parent's GCS. With the new exit_thread(), a failed copy_process() for one of these threads would do the same. Clear these fields in copy_thread(). Fixes: 506496bcbb42 ("arm64/gcs: Ensure that new threads have a GCS") Cc: stable@vger.kernel.org Cc: Mark Brown <broonie@kernel.org> Assisted-by: LLM Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Tested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions