diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-06-01 15:56:53 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-29 10:54:41 +0200 |
| commit | ed4b1672529018b2013c62235c4bf1ab0ae0e3d4 (patch) | |
| tree | 69ad565641c1ef8f6c127ecbb082be290e1c4ef3 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git | |
| parent | 14adbd5341aae18e7e14bc3786b49007c26b2503 (diff) | |
fs: add umh argument to struct kernel_clone_args
Add a umh field to struct kernel_clone_args. When set, copy_fs() copies
from pid 1's fs_struct instead of the kthread's fs_struct. This ensures
usermodehelper threads always get init's filesystem state regardless of
their parent's (kthreadd's) fs.
Usermodehelper threads are not allowed to create mount namespaces
(CLONE_NEWNS), share filesystem state (CLONE_FS), or be started from
a non-initial mount namespace. No usermodehelper currently does this so
we don't need to worry about this restriction.
Set .umh = 1 in user_mode_thread(). At this stage pid 1's fs points to
rootfs which is the same as kthreadd's fs, so this is functionally
equivalent.
Link: https://patch.msgid.link/20260601-work-kthread-nullfs-v4-20-77ee053060e0@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
