From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: <dedekind1@gmail.com>
Cc: linux-mtd@lists.infradead.org, adrian.hunter@intel.com
Subject: Re: [PATCH] ubifs: atomically set inode->i_flags in ubifs_set_inode_flags()
Date: Wed, 16 Apr 2014 10:09:32 +0800 [thread overview]
Message-ID: <534DE65C.3080806@huawei.com> (raw)
In-Reply-To: <1397568673.4441.10.camel@karhu>
On 2014/4/15 21:31, Artem Bityutskiy wrote:
> On Tue, 2014-04-15 at 14:15 +0800, Zhang Zhen wrote:
>> Use set_mask_bits() to atomically set i_flags instead of clearing out the
>> S_IMMUTABLE, S_APPEND, etc. flags and then setting them from the
>> UBIFS_IMMUTABLE, UBIFS_APPEND_FL, etc. flags, since this opens up a race
>> where an immutable file has the immutable flag cleared for a brief
>> window of time.
>>
>> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
>
> Looks correct to me. Does it fix a real-life bug or just a hypothetical
> issue? Also, did you test it?
>
Hi,
It's just a hypothetical issue.
I noticed the commit 00a1a053ebe5febcfc2ec498bd894f035ad2aa06 added the function
set_mask_bits() to atomically set i_flags, and it is also useful to UBIFS.
So i fix it.
Sorry, Because of lacking of test board, i can only guarantee that it has no compile error.
Best regards!
prev parent reply other threads:[~2014-04-16 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1397465159-45836-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-04-15 6:15 ` [PATCH] ubifs: atomically set inode->i_flags in ubifs_set_inode_flags() Zhang Zhen
2014-04-15 13:31 ` Artem Bityutskiy
2014-04-16 2:09 ` Zhang Zhen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534DE65C.3080806@huawei.com \
--to=zhenzhang.zhang@huawei.com \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.