From: Chao Yu <chao@kernel.org>
To: Gao Xiang <hsiangkao@aol.com>, linux-erofs@lists.ozlabs.org
Cc: LKML <linux-kernel@vger.kernel.org>, stable@vger.kernel.org
Subject: Re: [PATCH] erofs: initialized fields can only be observed after bit is set
Date: Thu, 11 Feb 2021 11:45:20 +0800 [thread overview]
Message-ID: <801d8f5d-9d5f-bc6a-1796-70d1038611da@kernel.org> (raw)
In-Reply-To: <20210209130618.15838-1-hsiangkao@aol.com>
On 2021/2/9 21:06, Gao Xiang via Linux-erofs wrote:
> From: Gao Xiang <hsiangkao@redhat.com>
>
> Currently, although set_bit() & test_bit() pairs are used as a fast-
> path for initialized configurations. However, these atomic ops are
> actually relaxed forms. Instead, load-acquire & store-release form is
> needed to make sure uninitialized fields won't be observed in advance
> here (yet no such corresponding bitops so use full barriers instead.)
>
> Fixes: 62dc45979f3f ("staging: erofs: fix race of initializing xattrs of a inode at the same time")
> Fixes: 152a333a5895 ("staging: erofs: add compacted compression indexes support")
> Cc: <stable@vger.kernel.org> # 5.3+
> Reported-by: Huang Jianan <huangjianan@oppo.com>
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Thanks for detailed explanation for barrier offline.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
prev parent reply other threads:[~2021-02-11 3:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210209130618.15838-1-hsiangkao.ref@aol.com>
2021-02-09 13:06 ` [PATCH] erofs: initialized fields can only be observed after bit is set Gao Xiang
2021-02-10 12:09 ` Chao Yu
2021-02-10 12:38 ` Gao Xiang
2021-02-11 3:45 ` Chao Yu [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=801d8f5d-9d5f-bc6a-1796-70d1038611da@kernel.org \
--to=chao@kernel.org \
--cc=hsiangkao@aol.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox