Messages in this thread Patch in this message | | | Subject | Re: eject /dev/cdrom --> oops. (patch) | Date | Wed, 29 Oct 1997 03:19:52 +0000 | From | David Woodhouse <> |
| |
Apparently the problem was caused by trying to mount my IDE cd when the drive was empty. The vfsmntlist was ending up with an entry in which xxx->mnt_sb-> s_type == NULL, so the references to tmp->mnt_sb->s_type->name in get_filesystem_info weren't particularly happy.
This isn't a real fix, but at least it stops the oopses by checking for that case and not attempting to dereference the pointer. I believe the real problem is in the CD drivers - attempting to mount an empty floppy drive doesn't produce the same problems.
This is against the vger snapshot of 971020. When's the next one due? --- linux/fs/super.c.orig Sat Oct 18 05:12:08 1997 +++ linux/fs/super.c Wed Oct 29 02:18:49 1997 @@ -331,7 +331,8 @@ while ( tmp && len < PAGE_SIZE - 160) { len += sprintf( buf + len, "%s %s %s %s", - tmp->mnt_devname, tmp->mnt_dirname, tmp->mnt_sb->s_type->name, + tmp->mnt_devname, tmp->mnt_dirname, + tmp->mnt_sb->s_type?tmp->mnt_sb->s_type->name:"BUG!", tmp->mnt_flags & MS_RDONLY ? "ro" : "rw" ); for (fs_infop = fs_info; fs_infop->flag; fs_infop++) { if (tmp->mnt_flags & fs_infop->flag) { @@ -339,7 +340,7 @@ len += strlen(fs_infop->str); } } - if (!strcmp("nfs", tmp->mnt_sb->s_type->name)) { + if (tmp->mnt_sb->s_type && !strcmp("nfs", tmp->mnt_sb->s_type->name)) { nfss = &tmp->mnt_sb->u.nfs_sb.s_server; if (nfss->rsize != NFS_DEF_FILE_IO_BUFFER_SIZE) { len += sprintf(buf+len, ",rsize=%d",
| |