RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 645824 - ext4: Don't error out the fs if the user tries to make a file too big
Summary: ext4: Don't error out the fs if the user tries to make a file too big
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Boris Ranto
URL:
Whiteboard:
Depends On:
Blocks: 715501
TreeView+ depends on / blocked
 
Reported: 2010-10-22 15:02 UTC by Debbie Johnson
Modified: 2018-11-14 16:48 UTC (History)
7 users (show)

Fixed In Version: kernel-2.6.32-84.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 715501 (view as bug list)
Environment:
Last Closed: 2011-05-23 20:27:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
script that duplicates/shows issue (1.36 KB, application/x-shellscript)
2011-01-17 17:10 UTC, Debbie Johnson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0542 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6.1 kernel security, bug fix and enhancement update 2011-05-19 11:58:07 UTC

Description Debbie Johnson 2010-10-22 15:02:09 UTC
Description of problem:
ext4: Don't error out the fs if the user tries to make a file too big

Version-Release number of selected component (if applicable):
V6.0

How reproducible:

do_truncate() can call ext4_setattr() (via notify_change()).
And, ext4_setattr() can return with -EFBIG if the argument(length) of
do_truncate() is more than sbi->s_bitmap_maxbytes. At that time,
it also calls ext4_std_error() with -EFBIG.

Besides, a panic happens when ext4_setattr() returns with -EFBIG
after we mount an ext4 filesystem with errors=panic.

The following steps(Step to Reproduce) can make this problem easily.

This problem is in:
5482 if (attr->ia_valid & ATTR_SIZE) {
5483 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
5484 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
5485
5486 if (attr->ia_size > sbi->s_bitmap_maxbytes) {
5487 error = -EFBIG;
5488 goto err_out;
5489 }
5490 }
5491 }

5543 err_out:
5544 ext4_std_error(inode->i_sb, error);
5545 if (!error)
5546 error = rc;
5547 return error;
(because ext4_setattr() calls ext4_std_error() when error == -EFBIG)

This fix is already included in 2.6.36-rc1.
(http://marc.info/?l=git-commits-head&m=128121841924078&w=2)
Please apply it.

Additional info:

Comment 1 Ondrej Vasik 2010-10-22 16:25:56 UTC
filesystem package (basic system directory structure) has nothing to do with ext4 filesystem. Reassigning to kernel.

Comment 3 RHEL Program Management 2010-11-01 15:59:47 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 5 Zhang Kexin 2010-11-23 02:14:58 UTC
copied from http://marc.info/?l=git-commits-head&m=128121841924078&w=2 , this might explain how to reproduce the bug.

    If the user attempts to make a non-extent-mapped file to be too large,
    return EFBIG, but don't call ext4_std_err() which will end up marking
    the file system as containing an error.

Comment 6 Aristeu Rozanski 2010-12-13 15:09:06 UTC
Patch(es) available on kernel-2.6.32-89.el6

Comment 8 Debbie Johnson 2011-01-17 17:10:59 UTC
Created attachment 473895 [details]
script that duplicates/shows issue

Comment 12 errata-xmlrpc 2011-05-23 20:27:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html


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