| From | Christian Brauner <> | | Date | Fri, 06 Mar 2026 00:30:23 +0100 | | Subject | [PATCH RFC v2 20/23] devtmpfs: create private mount namespace |
| |
Kernel threads are located in a completely isolated nullfs mount. Make it possible for a kthread to create a private mount namespace so it can mount private filesystem instances. This is only used by devtmpfs.
Signed-off-by: Christian Brauner <brauner@kernel.org> --- drivers/base/devtmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index b1c4ceb65026..246ac0b331fe 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -413,7 +413,7 @@ static noinline int __init devtmpfs_setup(void *p) { int err; - err = ksys_unshare(CLONE_NEWNS); + err = kthread_mntns(); if (err) goto out; err = init_mount("devtmpfs", "/", "devtmpfs", DEVTMPFS_MFLAGS, NULL); -- 2.47.3
|