2007-09-19 16:36:27

by Leonid Kalev

[permalink] [raw]
Subject: [PATCH] [UFS] fs/ufs/super.c misreads the file system state

ufs_get_fs_state() needs the file system type to read the state from the
correct place in the superblock. It takes the type from
UFS_SB(sb)->s_flags, but that value is stored after the first call to
ufs_get_fs_state(). The patch below moves the assignment of s_flags up,
before the first call to ufs_get_fs_state().

The patch is against linux-2.6.23-rc6-git7, but it applies (with offset)
to 2.6.22 and to earlier versions as well. It has been tested on the
Solaris flavor of UFS (ufstype=sunx86) - with this change, the file
system can be used in read-write mode.

* Please cc me when replying to this - I am not subscribed to the
linux-kernel list. *

Leonid


Attachments:
ufs_state_bug_l.patch (453.00 B)

2007-09-20 12:36:44

by Satyam Sharma

[permalink] [raw]
Subject: Re: [PATCH] [UFS] fs/ufs/super.c misreads the file system state



On Wed, 19 Sep 2007, Leonid Kalev wrote:
>
> ufs_get_fs_state() needs the file system type to read the state from the
> correct place in the superblock. It takes the type from UFS_SB(sb)->s_flags,
> but that value is stored after the first call to ufs_get_fs_state(). The patch
> below moves the assignment of s_flags up, before the first call to
> ufs_get_fs_state().
>
> The patch is against linux-2.6.23-rc6-git7, but it applies (with offset) to
> 2.6.22 and to earlier versions as well. It has been tested on the Solaris
> flavor of UFS (ufstype=sunx86) - with this change, the file system can be used
> in read-write mode.

The same fix is already in 2.6.23-rc6-mm1 (don't know if it's lined up
for .23 though, I think it should be).


Satyam

PS: All my mails to Evgeniy Dushistov never reach him. The mail.ru server
is absolutely *evil* and simply rejects all mails unless the sender
is already whitelisted by the reciever (!)