mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
devtmpfs: create private mount namespace
Kernel threads start in a completely isolated nullfs mount. Use UNSHARE_EMPTY_MNTNS to give the devtmpfsd kthread a private empty mount namespace with its root and pwd already set up, so it can mount its own devtmpfs instance instead of unsharing a copy of the initial mount namespace. Link: https://patch.msgid.link/20260601-work-kthread-nullfs-v4-21-77ee053060e0@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
ed4b167252
commit
66d2faeccb
|
|
@ -413,7 +413,7 @@ static noinline int __init devtmpfs_setup(void *p)
|
|||
{
|
||||
int err;
|
||||
|
||||
err = ksys_unshare(CLONE_NEWNS);
|
||||
err = ksys_unshare(UNSHARE_EMPTY_MNTNS);
|
||||
if (err)
|
||||
goto out;
|
||||
err = init_mount("devtmpfs", "/", "devtmpfs", DEVTMPFS_MFLAGS, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user