From: Andrew Morton <akpm@linux-foundation.org>
To: Baokun Li <libaokun1@huawei.com>
Cc: <linux-fsdevel@vger.kernel.org>, <viro@zeniv.linux.org.uk>,
<brauner@kernel.org>, <jack@suse.cz>, <tj@kernel.org>,
<dennis@kernel.org>, <adilger.kernel@dilger.ca>,
<linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>,
<yangerkun@huawei.com>, <houtao1@huawei.com>,
<stable@vger.kernel.org>
Subject: Re: [PATCH v2] writeback, cgroup: fix null-ptr-deref write in bdi_split_work_to_wbs
Date: Mon, 10 Apr 2023 20:53:17 -0700 [thread overview]
Message-ID: <20230410205317.dcb186166b9603eeb876dfda@linux-foundation.org> (raw)
In-Reply-To: <20230410130826.1492525-1-libaokun1@huawei.com>
On Mon, 10 Apr 2023 21:08:26 +0800 Baokun Li <libaokun1@huawei.com> wrote:
>
> ...
>
> To solve this problem, percpu_ref_exit() is called under RCU protection
> to avoid race between cgwb_release_workfn() and bdi_split_work_to_wbs().
> Moreover, replace wb_get() with wb_tryget() in bdi_split_work_to_wbs(),
> and skip the current wb if wb_tryget() fails because the wb has already
> been shutdown.
>
> Fixes: b817525a4a80 ("writeback: bdi_writeback iteration must not skip dying ones")
> Fixes: f3b6a6df38aa ("writeback, cgroup: keep list of inodes attached to bdi_writeback")
Two Fixes: is awkward. The Fixes: serves a guide to which kernel
versions should be patched, but those two commits are six years apart.
So... how far back should this fix be backported?
> fs/fs-writeback.c | 17 ++++++++++-------
> mm/backing-dev.c | 12 ++++++++++--
Jens, which tree do you think should carry this?
next prev parent reply other threads:[~2023-04-11 3:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 13:08 Baokun Li
2023-04-11 3:53 ` Andrew Morton [this message]
2023-04-11 4:09 ` Baokun Li
2023-04-11 10:08 ` Jan Kara
2023-04-12 17:00 ` Tejun Heo
2023-05-03 0:17 ` Andrew Morton
2023-05-03 22:01 ` Roman Gushchin
2023-05-04 2:29 ` Baokun Li
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=20230410205317.dcb186166b9603eeb876dfda@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adilger.kernel@dilger.ca \
--cc=brauner@kernel.org \
--cc=dennis@kernel.org \
--cc=houtao1@huawei.com \
--cc=jack@suse.cz \
--cc=libaokun1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@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
all inboxes | Powered by JetHome®