Hello,
I think a line ".owner = THIS_MODULE," should be
inserted at http://lxr.linux.no/source/fs/ramfs/inode.c#L216 .
Without this line, ramfs can't work safely as a module, for
it doesn't increment module usage counter,
resulting successful rmmod while ramfs is mounted
and subsequent crash.
I know ramfs in 2.6 are always built into kernel,
but someone would get troubled when
examining ramfs code for study purpose.
Best Regards.
---------- START OF PATCH ----------
--- linux-2.6.13.4/fs/ramfs/inode.c 2005-10-11 03:54:29.000000000 +0900
+++ linux-2.6.13.4-ramfs/fs/ramfs/inode.c 2005-10-18 08:53:51.000000000 +0900
@@ -215,11 +215,13 @@
}
static struct file_system_type ramfs_fs_type = {
+ .owner = THIS_MODULE,
.name = "ramfs",
.get_sb = ramfs_get_sb,
.kill_sb = kill_litter_super,
};
static struct file_system_type rootfs_fs_type = {
+ .owner = THIS_MODULE,
.name = "rootfs",
.get_sb = rootfs_get_sb,
.kill_sb = kill_litter_super,
---------- END OF PATCH ----------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]