lkml.org 
[lkml]   [1999]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Re: 2.2.0-pre2 fat_read_super: Bad fsinfo_offset
On Fri, 1 Jan 1999, christophe leroy wrote:
> My first patch was imcomplete and was apparently corrupting
> vfat fs.
> This one wont corrupt anything, and people should be able
> to mount correctly vfat32 fs

It doesn't corrupt anything, but it doesn't mount fat32 filesystems
either... (Scandisk can't find anything wrong with the filesystem)

Going back in the linux-kernel archive it looks like this is some kind of
attempt to avoid an oops when mounting a specific floppy, that have an
*almost* valid filesystem on it?!

Even if it didn't HAVE negative side-effect it would have been pretty
close to what should go in this close to 2.2.0, but the first version
trashed filesystems and the second just made them unavailable from
Linux(mine and at least one other report to linux-kernel in less than one
day!)...

Please Linus, just yank out that code until after 2.2.0! Preferably until
after it's debugged, if ever, but at least until after 2.2.0 is out of the
door.

Patch to revert remove the code from 2.2.0pre3 is attached.
--- linux/fs/fat/inode.c.orig Fri Jan 1 21:19:45 1999
+++ linux/fs/fat/inode.c Sat Jan 2 15:44:42 1999
@@ -364,11 +364,6 @@
MSDOS_SB(sb)->root_cluster = CF_LE_L(b->root_cluster);
MSDOS_SB(sb)->fsinfo_offset =
CF_LE_W(b->info_sector) * logical_sector_size + 0x1e0;
- if (MSDOS_SB(sb)->fsinfo_offset + sizeof(MSDOS_SB(sb)->fsinfo_offset) >= sizeof(struct fat_boot_sector)) {
- printk("fat_read_super: Bad fsinfo_offset\n");
- fat_brelse(sb, bh);
- goto out_invalid;
- }
fsinfo = (struct fat_boot_fsinfo *)
&bh->b_data[MSDOS_SB(sb)->fsinfo_offset];
if (CF_LE_L(fsinfo->signature) != 0x61417272) {
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.044 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site