[lkml]   [2001]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] fs/fat/inode.c missing errorhandling

I found a problem with fat when I tried to mount a fat filesystem created
with 'mkdosfs -F 32 -S 8192'. I tried mounting it as vfat and I got a
panic() from set_blocksize() in fs/buffer.c

fs/fat/inode.c sets an error veriable if it detects an error but it
doesn't bail out immediately, instead it tries to pass this sectorsize to
set_blocksize() which checks if it's bigger than PAGE_SIZE and then

The solution is to bail out before set_blocksize() is called.
I checked with Al Viro on irc and he agreed.

--- linux/fs/fat/inode.c.orig Thu Oct 4 18:19:37 2001
+++ linux/fs/fat/inode.c Thu Oct 4 18:20:39 2001
@@ -712,6 +712,9 @@

+ if (error)
+ goto out_invalid;
sb->s_blocksize = logical_sector_size;
sb->s_blocksize_bits = ffs(logical_sector_size) - 1;
set_blocksize(sb->s_dev, sb->s_blocksize);


Never argue with an idiot. They drag you down to their level, then beat you with experience.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:04    [W:0.035 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site