[Bug 15792] ext4_inode_inode->i_flags modification is racy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: bugzilla-daemon
Date: Thursday, April 15, 2010 - 3:31 pm

https://bugzilla.kernel.org/show_bug.cgi?id=15792





--- Comment #2 from Dmitry Monakhov <dmonakhov@openvz.org>  2010-04-15 22:31:55 ---
The oops happens because non tested branch was triggered.
./fs/ext4/extents.c
3477:    if (unlikely(EXT4_I(inode)->i_flags & EXT4_EOFBLOCKS_FL)) {
                if (unlikely(!eh->eh_entries)) {
                        EXT4_ERROR_INODE(inode,
                                         "eh->eh_entries == 0 ee_block %d",
                                         ex->ee_block);
### OOPS here because ex == NULL ^^^^^^^^^^^^^^^^^^^^^^^^
                        err = -EIO;
                        goto out2;
                }

Bug was introduced by following commit:
commit 273df556b6ee2065bfe96edab5888d3dc9b108d8
Author: Frank Mayhar <fmayhar@google.com>
Date:   Tue Mar 2 11:46:09 2010 -0500

And in fact it is rather trivial to fix.
But most interesting question what the hell we are doing on that error path?
inode has EXT4_EOFBLOCKS_FL flag enabled but eh->eh_entries, and in fact
after adding more debug information i've found that inode is simply blockless.
i_blocks == 0, i_size == 0.

I've collected per-inode i_flag modification history (see an attachment)

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Bug 15792] ext4_inode_inode->i_flags modification is racy, bugzilla-daemon, (Thu Apr 15, 3:31 pm)
[Bug 15792] ext4_inode_info-&gt;i_flags modification is racy, bugzilla-daemon, (Thu Apr 15, 3:54 pm)
[Bug 15792] ext4_inode_info-&gt;i_flags modification is racy, bugzilla-daemon, (Sun Apr 18, 8:43 pm)
[Bug 15792] ext4_inode_info-&gt;i_flags modification is racy, bugzilla-daemon, (Mon Apr 19, 7:38 am)
[Bug 15792] ext4_inode_info-&gt;i_flags modification is racy, bugzilla-daemon, (Tue Jul 6, 12:15 am)