From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
"# 6 . 2 . x" <stable@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [RFC PATCH v1.1 04/11] mm/damon/sysfs-schemes: kobject_del() scheme region dirs
Date: Wed, 17 Jun 2026 07:47:58 -0700 [thread overview]
Message-ID: <20260617144807.91441-5-sj@kernel.org> (raw)
In-Reply-To: <20260617144807.91441-1-sj@kernel.org>
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del()
could cause directories creation failures due to the name conflicts. Fix
those issues for scheme region directories by adding kobject_del()
calls.
This issue was discovered [1] by Sashiko, though its analysis was
partially incorrect.
[1] https://lore.kernel.org/20260517205828.6204-1-sj@kernel.org
Fixes: 9277d0367ba1 ("mm/damon/sysfs-schemes: implement scheme region directory")
Cc: <stable@vger.kernel.org> # 6.2.x
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/sysfs-schemes.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index debf2a3a0d8fc..604b77a47a463 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -334,6 +334,7 @@ static void damon_sysfs_scheme_regions_rm_dirs(
list_for_each_entry_safe(r, next, ®ions->regions_list, list) {
damos_sysfs_region_rm_dirs(r);
list_del(&r->list);
+ kobject_del(&r->kobj);
kobject_put(&r->kobj);
regions->nr_regions--;
}
--
2.47.3
next prev parent reply other threads:[~2026-06-17 14:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 14:47 [RFC PATCH v1.1 00/11] mm/damon/sysfs: kobject_del() directories that users can create/remove SeongJae Park
2026-06-17 14:47 ` [RFC PATCH v1.1 01/11] mm/damon/sysfs: kobject_del() target (normal), context and kdamond dirs SeongJae Park
2026-06-17 14:47 ` [RFC PATCH v1.1 02/11] mm/damon/sysfs: kobject_del() region and target (error) dirs SeongJae Park
2026-06-17 14:47 ` [RFC PATCH v1.1 03/11] mm/damon/sysfs-schemes: kobject_del() scheme dirs SeongJae Park
2026-06-17 14:47 ` SeongJae Park [this message]
2026-06-17 14:47 ` [RFC PATCH v1.1 05/11] mm/damon/sysfs-schemes: kobject_del() scheme filter dirs SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 06/11] mm/damon/sysfs-schemes: kobject_del() scheme quota goal dirs SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 07/11] mm/damon/sysfs-schemes: kobject_del() scheme action destination dirs SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 08/11] mm/damon/sysfs: kobject_del() probe dirs SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 09/11] mm/damon/sysfs: kobject_del() probe filter dirs SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 10/11] mm/damon/sysfs: kobject_del() probe dirs in probes_addd_dir error path SeongJae Park
2026-06-17 14:48 ` [RFC PATCH v1.1 11/11] mm/damon/sysfs-schemes: kobject_del() region for populate_region error SeongJae Park
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=20260617144807.91441-5-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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