From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: yangerkun <yangerkun@huawei.com>
Cc: jack@suse.com, adilger@dilger.ca, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: do not use extent after put_bh
Date: Thu, 29 Oct 2020 00:14:51 -0400 [thread overview]
Message-ID: <20201029041451.GT5691@mit.edu> (raw)
In-Reply-To: <20201028055617.2569255-1-yangerkun@huawei.com>
On Wed, Oct 28, 2020 at 01:56:17PM +0800, yangerkun wrote:
> ext4_ext_search_right will read more extent block and call put_bh after
> we get the information we need. However ret_ex will break this and may
> cause use-after-free once pagecache has been freed. Fix it by dup the
> extent we need.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
Good catch!
Thanks, applied.
- Ted
next prev parent reply other threads:[~2020-10-29 7:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 5:56 [PATCH] ext4: do not use extent after put_bh yangerkun
2020-10-29 4:14 ` Theodore Y. Ts'o [this message]
2020-10-29 16:08 ` Ritesh Harjani
2020-10-30 1:23 ` yangerkun
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=20201029041451.GT5691@mit.edu \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=yangerkun@huawei.com \
/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