blob: 56632fb22fc0b6aac7ba6315a4c4559de82fe5d6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Kay Sievers2b2af542009-04-30 15:23:42 +02002/*
3 * devtmpfs - kernel-maintained tmpfs-based /dev
4 *
5 * Copyright (C) 2009, Kay Sievers <kay.sievers@vrfy.org>
6 *
7 * During bootup, before any driver core device is registered,
8 * devtmpfs, a tmpfs-based filesystem is created. Every driver-core
9 * device which requests a device node, will add a node in this
Kay Sieverse454cea2009-09-18 23:01:12 +020010 * filesystem.
Peter Korsgaard02fbe5e2012-04-17 12:13:18 +020011 * By default, all devices are named after the name of the device,
12 * owned by root and have a default mode of 0600. Subsystems can
13 * overwrite the default setting if needed.
Kay Sievers2b2af542009-04-30 15:23:42 +020014 */
15
16#include <linux/kernel.h>
17#include <linux/syscalls.h>
18#include <linux/mount.h>
19#include <linux/device.h>
20#include <linux/genhd.h>
21#include <linux/namei.h>
22#include <linux/fs.h>
23#include <linux/shmem_fs.h>
Peter Korsgaardda5e4ef2010-03-16 21:55:21 +010024#include <linux/ramfs.h>
Kay Sieverse454cea2009-09-18 23:01:12 +020025#include <linux/sched.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090026#include <linux/slab.h>
Al Viro2780f1f2011-06-27 16:25:29 -040027#include <linux/kthread.h>
David Howellse262e32d2018-11-01 23:07:23 +000028#include <uapi/linux/mount.h>
Greg Kroah-Hartmanc3a30422013-04-10 09:00:15 -070029#include "base.h"
Kay Sievers2b2af542009-04-30 15:23:42 +020030
Al Viro2780f1f2011-06-27 16:25:29 -040031static struct task_struct *thread;
Kay Sievers2b2af542009-04-30 15:23:42 +020032
Rasmus Villemoesfad1db82020-01-15 19:41:52 +010033static int __initdata mount_dev = IS_ENABLED(CONFIG_DEVTMPFS_MOUNT);
Kay Sievers2b2af542009-04-30 15:23:42 +020034
Al Viro2780f1f2011-06-27 16:25:29 -040035static DEFINE_SPINLOCK(req_lock);
36
37static struct req {
38 struct req *next;
39 struct completion done;
40 int err;
41 const char *name;
Al Viro2c9ede52011-07-23 20:24:48 -040042 umode_t mode; /* 0 => delete */
Greg Kroah-Hartman4e4098a2013-04-11 11:43:29 -070043 kuid_t uid;
44 kgid_t gid;
Al Viro2780f1f2011-06-27 16:25:29 -040045 struct device *dev;
46} *requests;
Kay Sieversed413ae2009-10-28 19:51:06 +010047
Kay Sievers2b2af542009-04-30 15:23:42 +020048static int __init mount_param(char *str)
49{
Al Virofc14f2f2010-07-25 01:48:30 +040050 mount_dev = simple_strtoul(str, NULL, 0);
Kay Sievers2b2af542009-04-30 15:23:42 +020051 return 1;
52}
53__setup("devtmpfs.mount=", mount_param);
54
Al Virod4017272019-06-01 18:43:09 -040055static struct vfsmount *mnt;
56
57static struct dentry *public_dev_mount(struct file_system_type *fs_type, int flags,
58 const char *dev_name, void *data)
59{
60 struct super_block *s = mnt->mnt_sb;
61 atomic_inc(&s->s_active);
62 down_write(&s->s_umount);
63 return dget(s->s_root);
64}
65
Al Virod4017272019-06-01 18:43:09 -040066static struct file_system_type internal_fs_type = {
Kay Sievers2b2af542009-04-30 15:23:42 +020067 .name = "devtmpfs",
David Howellsf3235622019-03-25 16:38:31 +000068#ifdef CONFIG_TMPFS
69 .init_fs_context = shmem_init_fs_context,
70 .parameters = &shmem_fs_parameters,
71#else
72 .init_fs_context = ramfs_init_fs_context,
73 .parameters = &ramfs_fs_parameters,
74#endif
Kay Sievers2b2af542009-04-30 15:23:42 +020075 .kill_sb = kill_litter_super,
76};
77
Al Virod4017272019-06-01 18:43:09 -040078static struct file_system_type dev_fs_type = {
79 .name = "devtmpfs",
80 .mount = public_dev_mount,
81};
82
Kay Sievers2b2af542009-04-30 15:23:42 +020083#ifdef CONFIG_BLOCK
84static inline int is_blockdev(struct device *dev)
85{
86 return dev->class == &block_class;
87}
88#else
89static inline int is_blockdev(struct device *dev) { return 0; }
90#endif
91
Al Viro2780f1f2011-06-27 16:25:29 -040092int devtmpfs_create_node(struct device *dev)
93{
94 const char *tmp = NULL;
95 struct req req;
96
97 if (!thread)
98 return 0;
99
100 req.mode = 0;
Greg Kroah-Hartman4e4098a2013-04-11 11:43:29 -0700101 req.uid = GLOBAL_ROOT_UID;
102 req.gid = GLOBAL_ROOT_GID;
Kay Sievers3c2670e2013-04-06 09:56:00 -0700103 req.name = device_get_devnode(dev, &req.mode, &req.uid, &req.gid, &tmp);
Al Viro2780f1f2011-06-27 16:25:29 -0400104 if (!req.name)
105 return -ENOMEM;
106
107 if (req.mode == 0)
108 req.mode = 0600;
109 if (is_blockdev(dev))
110 req.mode |= S_IFBLK;
111 else
112 req.mode |= S_IFCHR;
113
114 req.dev = dev;
115
116 init_completion(&req.done);
117
118 spin_lock(&req_lock);
119 req.next = requests;
120 requests = &req;
121 spin_unlock(&req_lock);
122
123 wake_up_process(thread);
124 wait_for_completion(&req.done);
125
126 kfree(tmp);
127
128 return req.err;
129}
130
131int devtmpfs_delete_node(struct device *dev)
132{
133 const char *tmp = NULL;
134 struct req req;
135
136 if (!thread)
137 return 0;
138
Kay Sievers3c2670e2013-04-06 09:56:00 -0700139 req.name = device_get_devnode(dev, NULL, NULL, NULL, &tmp);
Al Viro2780f1f2011-06-27 16:25:29 -0400140 if (!req.name)
141 return -ENOMEM;
142
143 req.mode = 0;
144 req.dev = dev;
145
146 init_completion(&req.done);
147
148 spin_lock(&req_lock);
149 req.next = requests;
150 requests = &req;
151 spin_unlock(&req_lock);
152
153 wake_up_process(thread);
154 wait_for_completion(&req.done);
155
156 kfree(tmp);
157 return req.err;
158}
159
Al Virofbd48a62011-07-24 10:47:56 -0400160static int dev_mkdir(const char *name, umode_t mode)
Kay Sievers2b2af542009-04-30 15:23:42 +0200161{
Kay Sievers2b2af542009-04-30 15:23:42 +0200162 struct dentry *dentry;
Al Viro69753a02011-06-27 16:35:45 -0400163 struct path path;
Kay Sievers2b2af542009-04-30 15:23:42 +0200164 int err;
165
Jeff Layton1ac12b42012-12-11 12:10:06 -0500166 dentry = kern_path_create(AT_FDCWD, name, &path, LOOKUP_DIRECTORY);
Al Viro69753a02011-06-27 16:35:45 -0400167 if (IS_ERR(dentry))
168 return PTR_ERR(dentry);
Kay Sievers2b2af542009-04-30 15:23:42 +0200169
David Howells75c3cfa2015-03-17 22:26:12 +0000170 err = vfs_mkdir(d_inode(path.dentry), dentry, mode);
Al Viro69753a02011-06-27 16:35:45 -0400171 if (!err)
172 /* mark as kernel-created inode */
David Howells75c3cfa2015-03-17 22:26:12 +0000173 d_inode(dentry)->i_private = &thread;
Al Viro921a1652012-07-20 01:15:31 +0400174 done_path_create(&path, dentry);
Kay Sievers2b2af542009-04-30 15:23:42 +0200175 return err;
176}
177
178static int create_path(const char *nodepath)
179{
Al Viro5da4e682011-06-27 16:37:12 -0400180 char *path;
181 char *s;
Al Viro9d108d22011-07-27 22:27:33 -0400182 int err = 0;
Kay Sievers2b2af542009-04-30 15:23:42 +0200183
Al Viro5da4e682011-06-27 16:37:12 -0400184 /* parent directories do not exist, create them */
185 path = kstrdup(nodepath, GFP_KERNEL);
186 if (!path)
187 return -ENOMEM;
Kay Sievers2b2af542009-04-30 15:23:42 +0200188
Al Viro5da4e682011-06-27 16:37:12 -0400189 s = path;
190 for (;;) {
191 s = strchr(s, '/');
192 if (!s)
193 break;
194 s[0] = '\0';
195 err = dev_mkdir(path, 0755);
196 if (err && err != -EEXIST)
197 break;
198 s[0] = '/';
199 s++;
Kay Sievers2b2af542009-04-30 15:23:42 +0200200 }
Al Viro5da4e682011-06-27 16:37:12 -0400201 kfree(path);
Kay Sievers2b2af542009-04-30 15:23:42 +0200202 return err;
203}
204
Greg Kroah-Hartman4e4098a2013-04-11 11:43:29 -0700205static int handle_create(const char *nodename, umode_t mode, kuid_t uid,
206 kgid_t gid, struct device *dev)
Kay Sievers2b2af542009-04-30 15:23:42 +0200207{
Kay Sievers2b2af542009-04-30 15:23:42 +0200208 struct dentry *dentry;
Al Viro69753a02011-06-27 16:35:45 -0400209 struct path path;
Kay Sievers2b2af542009-04-30 15:23:42 +0200210 int err;
211
Al Viro69753a02011-06-27 16:35:45 -0400212 dentry = kern_path_create(AT_FDCWD, nodename, &path, 0);
213 if (dentry == ERR_PTR(-ENOENT)) {
Kay Sievers2b2af542009-04-30 15:23:42 +0200214 create_path(nodename);
Al Viro69753a02011-06-27 16:35:45 -0400215 dentry = kern_path_create(AT_FDCWD, nodename, &path, 0);
Kay Sievers2b2af542009-04-30 15:23:42 +0200216 }
Al Viro69753a02011-06-27 16:35:45 -0400217 if (IS_ERR(dentry))
218 return PTR_ERR(dentry);
Kay Sievers2b2af542009-04-30 15:23:42 +0200219
David Howells75c3cfa2015-03-17 22:26:12 +0000220 err = vfs_mknod(d_inode(path.dentry), dentry, mode, dev->devt);
Al Viro69753a02011-06-27 16:35:45 -0400221 if (!err) {
222 struct iattr newattrs;
Kay Sievers00926992009-10-28 19:50:57 +0100223
Al Viro69753a02011-06-27 16:35:45 -0400224 newattrs.ia_mode = mode;
Greg Kroah-Hartman4e4098a2013-04-11 11:43:29 -0700225 newattrs.ia_uid = uid;
226 newattrs.ia_gid = gid;
Kay Sievers3c2670e2013-04-06 09:56:00 -0700227 newattrs.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID;
Al Viro59551022016-01-22 15:40:57 -0500228 inode_lock(d_inode(dentry));
J. Bruce Fields27ac0ff2011-09-20 17:19:26 -0400229 notify_change(dentry, &newattrs, NULL);
Al Viro59551022016-01-22 15:40:57 -0500230 inode_unlock(d_inode(dentry));
Kay Sievers00926992009-10-28 19:50:57 +0100231
Al Viro69753a02011-06-27 16:35:45 -0400232 /* mark as kernel-created inode */
David Howells75c3cfa2015-03-17 22:26:12 +0000233 d_inode(dentry)->i_private = &thread;
Kay Sievers2b2af542009-04-30 15:23:42 +0200234 }
Al Viro921a1652012-07-20 01:15:31 +0400235 done_path_create(&path, dentry);
Kay Sievers2b2af542009-04-30 15:23:42 +0200236 return err;
237}
238
239static int dev_rmdir(const char *name)
240{
Al Viro79714f72012-06-15 03:01:42 +0400241 struct path parent;
Kay Sievers2b2af542009-04-30 15:23:42 +0200242 struct dentry *dentry;
243 int err;
244
Al Viro79714f72012-06-15 03:01:42 +0400245 dentry = kern_path_locked(name, &parent);
246 if (IS_ERR(dentry))
247 return PTR_ERR(dentry);
David Howells75c3cfa2015-03-17 22:26:12 +0000248 if (d_really_is_positive(dentry)) {
249 if (d_inode(dentry)->i_private == &thread)
250 err = vfs_rmdir(d_inode(parent.dentry), dentry);
Al Viro79714f72012-06-15 03:01:42 +0400251 else
252 err = -EPERM;
Kay Sievers2b2af542009-04-30 15:23:42 +0200253 } else {
Al Viro79714f72012-06-15 03:01:42 +0400254 err = -ENOENT;
Kay Sievers2b2af542009-04-30 15:23:42 +0200255 }
Al Viro79714f72012-06-15 03:01:42 +0400256 dput(dentry);
Al Viro59551022016-01-22 15:40:57 -0500257 inode_unlock(d_inode(parent.dentry));
Al Viro79714f72012-06-15 03:01:42 +0400258 path_put(&parent);
Kay Sievers2b2af542009-04-30 15:23:42 +0200259 return err;
260}
261
262static int delete_path(const char *nodepath)
263{
Rasmus Villemoesbe6b1df2018-08-22 13:00:07 +0200264 char *path;
Kay Sievers2b2af542009-04-30 15:23:42 +0200265 int err = 0;
266
267 path = kstrdup(nodepath, GFP_KERNEL);
268 if (!path)
269 return -ENOMEM;
270
Kay Sieversed413ae2009-10-28 19:51:06 +0100271 for (;;) {
Kay Sievers2b2af542009-04-30 15:23:42 +0200272 char *base;
273
274 base = strrchr(path, '/');
275 if (!base)
276 break;
277 base[0] = '\0';
278 err = dev_rmdir(path);
279 if (err)
280 break;
281 }
282
283 kfree(path);
284 return err;
285}
286
287static int dev_mynode(struct device *dev, struct inode *inode, struct kstat *stat)
288{
289 /* did we create it */
Al Viro2780f1f2011-06-27 16:25:29 -0400290 if (inode->i_private != &thread)
Kay Sievers2b2af542009-04-30 15:23:42 +0200291 return 0;
292
293 /* does the dev_t match */
294 if (is_blockdev(dev)) {
295 if (!S_ISBLK(stat->mode))
296 return 0;
297 } else {
298 if (!S_ISCHR(stat->mode))
299 return 0;
300 }
301 if (stat->rdev != dev->devt)
302 return 0;
303
304 /* ours */
305 return 1;
306}
307
Al Viro2780f1f2011-06-27 16:25:29 -0400308static int handle_remove(const char *nodename, struct device *dev)
Kay Sievers2b2af542009-04-30 15:23:42 +0200309{
Al Viro79714f72012-06-15 03:01:42 +0400310 struct path parent;
Kay Sievers2b2af542009-04-30 15:23:42 +0200311 struct dentry *dentry;
Axel Linfbde7c62013-11-16 16:15:23 +0800312 int deleted = 0;
Kay Sievers2b2af542009-04-30 15:23:42 +0200313 int err;
314
Al Viro79714f72012-06-15 03:01:42 +0400315 dentry = kern_path_locked(nodename, &parent);
316 if (IS_ERR(dentry))
317 return PTR_ERR(dentry);
Kay Sievers2b2af542009-04-30 15:23:42 +0200318
David Howells75c3cfa2015-03-17 22:26:12 +0000319 if (d_really_is_positive(dentry)) {
Al Viro79714f72012-06-15 03:01:42 +0400320 struct kstat stat;
Al Viro3dadecc2013-01-24 02:18:08 -0500321 struct path p = {.mnt = parent.mnt, .dentry = dentry};
David Howellsa528d352017-01-31 16:46:22 +0000322 err = vfs_getattr(&p, &stat, STATX_TYPE | STATX_MODE,
323 AT_STATX_SYNC_AS_STAT);
David Howells75c3cfa2015-03-17 22:26:12 +0000324 if (!err && dev_mynode(dev, d_inode(dentry), &stat)) {
Al Viro79714f72012-06-15 03:01:42 +0400325 struct iattr newattrs;
326 /*
327 * before unlinking this node, reset permissions
328 * of possible references like hardlinks
329 */
Eric W. Biederman91fa2cc2012-04-25 04:25:35 -0700330 newattrs.ia_uid = GLOBAL_ROOT_UID;
331 newattrs.ia_gid = GLOBAL_ROOT_GID;
Al Viro79714f72012-06-15 03:01:42 +0400332 newattrs.ia_mode = stat.mode & ~0777;
333 newattrs.ia_valid =
334 ATTR_UID|ATTR_GID|ATTR_MODE;
Al Viro59551022016-01-22 15:40:57 -0500335 inode_lock(d_inode(dentry));
J. Bruce Fields27ac0ff2011-09-20 17:19:26 -0400336 notify_change(dentry, &newattrs, NULL);
Al Viro59551022016-01-22 15:40:57 -0500337 inode_unlock(d_inode(dentry));
David Howells75c3cfa2015-03-17 22:26:12 +0000338 err = vfs_unlink(d_inode(parent.dentry), dentry, NULL);
Al Viro79714f72012-06-15 03:01:42 +0400339 if (!err || err == -ENOENT)
340 deleted = 1;
Kay Sievers2b2af542009-04-30 15:23:42 +0200341 }
Kay Sievers2b2af542009-04-30 15:23:42 +0200342 } else {
Al Viro79714f72012-06-15 03:01:42 +0400343 err = -ENOENT;
Kay Sievers2b2af542009-04-30 15:23:42 +0200344 }
Al Viro79714f72012-06-15 03:01:42 +0400345 dput(dentry);
Al Viro59551022016-01-22 15:40:57 -0500346 inode_unlock(d_inode(parent.dentry));
Kay Sievers2b2af542009-04-30 15:23:42 +0200347
Al Viro79714f72012-06-15 03:01:42 +0400348 path_put(&parent);
Kay Sievers2b2af542009-04-30 15:23:42 +0200349 if (deleted && strchr(nodename, '/'))
350 delete_path(nodename);
Kay Sievers2b2af542009-04-30 15:23:42 +0200351 return err;
352}
353
354/*
355 * If configured, or requested by the commandline, devtmpfs will be
356 * auto-mounted after the kernel mounted the root filesystem.
357 */
Rasmus Villemoesfad1db82020-01-15 19:41:52 +0100358int __init devtmpfs_mount(void)
Kay Sievers2b2af542009-04-30 15:23:42 +0200359{
Kay Sievers2b2af542009-04-30 15:23:42 +0200360 int err;
361
Al Virofc14f2f2010-07-25 01:48:30 +0400362 if (!mount_dev)
Kay Sievers2b2af542009-04-30 15:23:42 +0200363 return 0;
364
Al Viro2780f1f2011-06-27 16:25:29 -0400365 if (!thread)
Kay Sievers2b2af542009-04-30 15:23:42 +0200366 return 0;
367
Dominik Brodowski5e787db2018-10-23 22:10:35 +0200368 err = do_mount("devtmpfs", "dev", "devtmpfs", MS_SILENT, NULL);
Kay Sievers2b2af542009-04-30 15:23:42 +0200369 if (err)
370 printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
371 else
372 printk(KERN_INFO "devtmpfs: mounted\n");
Kay Sievers2b2af542009-04-30 15:23:42 +0200373 return err;
374}
375
Arnaud Lacombef9e0b152011-07-21 13:16:19 -0400376static DECLARE_COMPLETION(setup_done);
Al Viro2780f1f2011-06-27 16:25:29 -0400377
Greg Kroah-Hartman4e4098a2013-04-11 11:43:29 -0700378static int handle(const char *name, umode_t mode, kuid_t uid, kgid_t gid,
Kay Sievers3c2670e2013-04-06 09:56:00 -0700379 struct device *dev)
Al Viro2780f1f2011-06-27 16:25:29 -0400380{
381 if (mode)
Kay Sievers3c2670e2013-04-06 09:56:00 -0700382 return handle_create(name, mode, uid, gid, dev);
Al Viro2780f1f2011-06-27 16:25:29 -0400383 else
384 return handle_remove(name, dev);
385}
386
Rasmus Villemoes0ff0e952020-01-15 19:41:50 +0100387static int devtmpfs_setup(void *p)
Al Viro2780f1f2011-06-27 16:25:29 -0400388{
Rasmus Villemoesc9d6b2872020-01-15 19:41:49 +0100389 int err;
390
391 err = ksys_unshare(CLONE_NEWNS);
392 if (err)
Al Viro2780f1f2011-06-27 16:25:29 -0400393 goto out;
Rasmus Villemoesc9d6b2872020-01-15 19:41:49 +0100394 err = do_mount("devtmpfs", "/", "devtmpfs", MS_SILENT, NULL);
395 if (err)
Al Viro2780f1f2011-06-27 16:25:29 -0400396 goto out;
Dominik Brodowski447016e2018-03-11 11:34:46 +0100397 ksys_chdir("/.."); /* will traverse into overmounted root */
Dominik Brodowskia16fe332018-03-11 11:34:41 +0100398 ksys_chroot(".");
Rasmus Villemoes0ff0e952020-01-15 19:41:50 +0100399out:
400 *(int *)p = err;
Al Viro2780f1f2011-06-27 16:25:29 -0400401 complete(&setup_done);
Rasmus Villemoes0ff0e952020-01-15 19:41:50 +0100402 return err;
403}
404
405static int devtmpfsd(void *p)
406{
407 int err = devtmpfs_setup(p);
408
409 if (err)
410 return err;
Al Viro2780f1f2011-06-27 16:25:29 -0400411 while (1) {
412 spin_lock(&req_lock);
413 while (requests) {
414 struct req *req = requests;
415 requests = NULL;
416 spin_unlock(&req_lock);
417 while (req) {
Al Viroe13889b2011-07-25 14:15:50 -0400418 struct req *next = req->next;
Kay Sievers3c2670e2013-04-06 09:56:00 -0700419 req->err = handle(req->name, req->mode,
420 req->uid, req->gid, req->dev);
Al Viro2780f1f2011-06-27 16:25:29 -0400421 complete(&req->done);
Al Viroe13889b2011-07-25 14:15:50 -0400422 req = next;
Al Viro2780f1f2011-06-27 16:25:29 -0400423 }
424 spin_lock(&req_lock);
425 }
Kautuk Consul65e67572011-11-15 14:52:34 -0800426 __set_current_state(TASK_INTERRUPTIBLE);
Al Viro2780f1f2011-06-27 16:25:29 -0400427 spin_unlock(&req_lock);
428 schedule();
Al Viro2780f1f2011-06-27 16:25:29 -0400429 }
430 return 0;
Al Viro2780f1f2011-06-27 16:25:29 -0400431}
432
Kay Sievers2b2af542009-04-30 15:23:42 +0200433/*
434 * Create devtmpfs instance, driver-core devices will add their device
435 * nodes here.
436 */
437int __init devtmpfs_init(void)
438{
Al Virod4017272019-06-01 18:43:09 -0400439 char opts[] = "mode=0755";
440 int err;
441
442 mnt = vfs_kern_mount(&internal_fs_type, 0, "devtmpfs", opts);
443 if (IS_ERR(mnt)) {
444 printk(KERN_ERR "devtmpfs: unable to create devtmpfs %ld\n",
445 PTR_ERR(mnt));
446 return PTR_ERR(mnt);
447 }
448 err = register_filesystem(&dev_fs_type);
Kay Sievers2b2af542009-04-30 15:23:42 +0200449 if (err) {
450 printk(KERN_ERR "devtmpfs: unable to register devtmpfs "
451 "type %i\n", err);
452 return err;
453 }
454
Al Viro2780f1f2011-06-27 16:25:29 -0400455 thread = kthread_run(devtmpfsd, &err, "kdevtmpfs");
456 if (!IS_ERR(thread)) {
457 wait_for_completion(&setup_done);
458 } else {
459 err = PTR_ERR(thread);
460 thread = NULL;
461 }
462
463 if (err) {
Kay Sievers2b2af542009-04-30 15:23:42 +0200464 printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err);
465 unregister_filesystem(&dev_fs_type);
466 return err;
467 }
Kay Sievers2b2af542009-04-30 15:23:42 +0200468
469 printk(KERN_INFO "devtmpfs: initialized\n");
470 return 0;
471}