From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@bugzilla.kernel.org
Subject: [Bug 15792] ext4_inode_info->i_flags modification is racy
Date: Mon, 19 Apr 2010 03:43:24 GMT
Message-ID: <201004190343.o3J3hOn7027727@demeter.kernel.org>
References:
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
To: linux-ext4@vger.kernel.org
Return-path:
Received: from demeter.kernel.org ([140.211.167.39]:52760 "EHLO
demeter.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1753401Ab0DSDnZ (ORCPT
); Sun, 18 Apr 2010 23:43:25 -0400
Received: from demeter.kernel.org (localhost.localdomain [127.0.0.1])
by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3J3hOGO027728
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
for ; Mon, 19 Apr 2010 03:43:24 GMT
In-Reply-To:
Sender: linux-ext4-owner@vger.kernel.org
List-ID:
https://bugzilla.kernel.org/show_bug.cgi?id=15792
--- Comment #5 from Dmitry Monakhov 2010-04-19 03:42:20 ---
Ohh.. one more thing, which is not actually related with the name of the bug,
But this peace of code was already mention here. Let's just document this here.
fs/ext4/extents.c
3288:int ext4_ext_get_blocks(...)
{
....
3477: if (unlikely(EXT4_I(inode)->i_flags & EXT4_EOFBLOCKS_FL)) {
3478: if (unlikely(!eh->eh_entries)) {
3479: EXT4_ERROR_INODE(inode,
3480: "eh->eh_entries == 0 ee_block %d",
3481: ex->ee_block);
3482: err = -EIO;
3483: goto out2;
3484: }
3485: last_ex = EXT_LAST_EXTENT(eh);
3486: if (iblock + ar.len > le32_to_cpu(last_ex->ee_block)
3487: + ext4_ext_get_actual_len(last_ex))
##### ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
##### If depth > 0 then last_ex may not be the latest extent of the file.
##### because "eh" is just a one of leafs(writing at the middle of a file)
##### We have to find latest extent by traversing a whole path again but
##### always chose the latest eh,ex.
3488: EXT4_I(inode)->i_flags &= ~EXT4_EOFBLOCKS_FL;
for (
3489: }
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.