Bug 517650 - ext4 allows ro->rw transitions of filesystems w/ features that can't be mounted rw
Summary: ext4 allows ro->rw transitions of filesystems w/ features that can't be mount...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Igor Zhang
Depends On:
TreeView+ depends on / blocked
Reported: 2009-08-15 16:44 UTC by Eric Sandeen
Modified: 2010-11-15 14:24 UTC (History)
3 users (show)

Fixed In Version: kernel-2.6.32-1.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2010-11-15 14:24:27 UTC

Attachments (Terms of Use)

Description Eric Sandeen 2009-08-15 16:44:39 UTC
Many checks in ext4_fill_super are checking for ro-compat features etc - for example, HUGE_FILES filesystems are denied rw mounts on a 32-bit box w/o LBD.

However, these tests aren't enforced on a ro->rw remount transition.  This could potentially be bad, esp. as the normal boot process does a remount in this manner.

The tests probably need to be moved to a separate helper function that can be called by both the mount & remount paths.  And in any case, ext4_fill_super could use some refactoring at 676 lines.

Comment 2 Eric Sandeen 2009-08-16 22:10:46 UTC
Sent a patch upstream for this:


Comment 3 Eric Sandeen 2009-09-25 15:35:16 UTC
Upstream now:

commit a13fb1a4533f26c1e2b0204d5283b696689645af
Author: Eric Sandeen <sandeen@redhat.com>
Date:   Tue Aug 18 00:20:23 2009 -0400

    ext4: Add feature set check helper for mount & remount paths
    A user reported that although his root ext4 filesystem was mounting
    fine, other filesystems would not mount, with the:
    "Filesystem with huge files cannot be mounted RDWR without CONFIG_LBDAF"
    error on his 32-bit box built without CONFIG_LBDAF.  This is because
    the test at mount time for this situation was not being re-checked
    on remount, and the normal boot process makes an ro->rw transition,
    so this was being missed.
    Refactor to make a common helper function to test the filesystem
    features against the type of mount request (RO vs. RW) so that we
    stay consistent.
    Addresses Red-Hat-Bugzilla: #517650
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Comment 4 Eric Sandeen 2009-12-01 22:59:10 UTC
The patch in comment #3 is in 2.6.32, so setting MODIFIED.

Comment 6 Igor Zhang 2010-09-30 08:59:01 UTC
Sanity Check in kernel-2.6.32-73.el6 and the code is there actually.

Comment 7 releng-rhel@redhat.com 2010-11-15 14:24:27 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.