From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Jos Hulzink <josh@stack.nl>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.5-pre1: mounting NTFS partitions -t VFAT
Date: Sat, 16 Feb 2002 05:18:54 +0900 [thread overview]
Message-ID: <87aduamrbl.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20020215112031.S68580-100000@toad.stack.nl>
In-Reply-To: <20020215112031.S68580-100000@toad.stack.nl>
Jos Hulzink <josh@stack.nl> writes:
> Hi,
>
> Due to a recent change of filesystems, I found the following: 2.5.5-pre1
> mounts my NTFS (win2k) partition as VFAT partition, if told to do so. The
> kernel returns errors, but the mount is there. One write to the partition
> was enough to destroy the entire NTFS partition.
>
> Due to filesystem damage, I didn't test the behaviour of the VFAT driver
> on other filesystems yet.
>
> Kernel 2.4.17 also returns errors, but there the mount fails.
>
> Will try to debug the problem myself this afternoon. Sounds like the VFAT
> procedure ignores some errors.
Sorry, my fault.
The following patch should fix this bug. I'll submit it after test.
--- fat_bug-2.5.5-pre1/fs/fat/inode.c.orig Thu Feb 14 13:47:54 2002
+++ fat_bug-2.5.5-pre1/fs/fat/inode.c Sat Feb 16 05:06:58 2002
@@ -624,6 +624,18 @@
}
b = (struct fat_boot_sector *) bh->b_data;
+ if (!b->fats) {
+ if (!silent)
+ printk("FAT: bogus number of FAT structure\n");
+ brelse(bh);
+ goto out_invalid;
+ }
+ if (!b->reserved) {
+ if (!silent)
+ printk("FAT: bogus number of reserved sectors\n");
+ brelse(bh);
+ goto out_invalid;
+ }
if (!b->secs_track) {
if (!silent)
printk("FAT: bogus sectors-per-track value\n");
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2002-02-15 20:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-15 10:30 2.5.5-pre1: mounting NTFS partitions -t VFAT Jos Hulzink
2002-02-15 17:11 ` Anton Altaparmakov
2002-02-15 20:18 ` OGAWA Hirofumi [this message]
2002-02-18 12:55 ` Jos Hulzink
2002-02-18 14:56 ` OGAWA Hirofumi
2002-02-19 10:02 ` VFS issues (was: Re: 2.5.5-pre1: mounting NTFS partitions -t VFAT) Jos Hulzink
2002-02-19 11:52 ` Richard Russon
2002-02-19 12:48 ` Jos Hulzink
2002-02-19 13:34 ` Alexander Viro
2002-02-19 14:25 ` Denis Vlasenko
2002-02-19 11:03 ` Jos Hulzink
2002-03-09 9:50 ` [BUG] 2.5.6: IPv6 fails to initialize Jos Hulzink
2002-03-09 20:55 ` Ben Clifford
2002-03-11 17:58 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aduamrbl.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=josh@stack.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox