Messages in this thread | | | From | (Eric W. Biederman) | Date | Fri, 18 Sep 2009 13:58:15 -0700 | Subject | Re: [bug] /etc/profile: line 30: /dev/null: Permission denied |
| |
As a special case you can implement this much more simply in devtmpfs_mount just do:
int devtmpfs_mount(const char *mountpoint) { sys_mount("none", "dev", "devtmpfs", MS_SILENT, NULL); sys_chmod("dev/console", 0666); sys_chmod("dev/tty", 0666); sys_chmod("dev/null", 0666); sys_chmod("dev/zero", 0666); }
Not using sys_mount is the problem Christoph was complaining about.
Grafting dev_mount into the global namespace (instead of making a copy and grafting that is pretty hideous). It means that vfs_path_lookup will follow mounts, and it is a reference counting problem. You can probably oops the kernel by going into single user mode and unmounting devtmpfs as the code stands right now.
Eric
| |