[Bug,205197] kernel BUG at fs/ext4/extents_status.c:884
diff mbox series

Message ID bug-205197-13602-htPXuojSgi@https.bugzilla.kernel.org/
State New
Headers show
  • [Bug,205197] kernel BUG at fs/ext4/extents_status.c:884
Related show

Commit Message

bugzilla-daemon@bugzilla.kernel.org Oct. 15, 2019, 1:53 p.m. UTC

Theodore Tso (tytso@mit.edu) changed:

           What    |Removed                     |Added
                 CC|                            |tytso@mit.edu

--- Comment #1 from Theodore Tso (tytso@mit.edu) ---
It looks like the journal inode is corrupted but it shouldn't have BUG'ed on

Can you reproduce this crash?  If so, does this fairly simple patch cause it
not to BUG?  (It will still fail to mount, but it shouldn't crash.)


Apologies if this is whitespace damaged, but t's a fairly simple edit to apply,
and I'm currently on a chromebook so I can't easily get a patch uploaded into

diff mbox series

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index f203bf989a4c..d83b325fb54b 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -375,7 +375,7 @@  static int ext4_valid_extent(struct inode *inode, struct
ext4_extent *ext)
         *  - zero length
         *  - overflow/wrap-around
-       if (lblock + len <= lblock)
+       if (lblock + (ext4_lblk_t) len <= lblock)
                return 0;
        return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);