From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
"# 6 . 3 . 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 5/9] mm/damon/sysfs-schemes: kobject_del() scheme filter dirs
Date: Tue, 16 Jun 2026 08:08:39 -0700 [thread overview]
Message-ID: <20260616150844.88305-6-sj@kernel.org> (raw)
In-Reply-To: <20260616150844.88305-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 filter directories by adding kobject_del()
calls.
Fixes: 472e2b70eda6 ("mm/damon/sysfs-schemes: connect filter directory and filters directory")
Cc: <stable@vger.kernel.org> # 6.3.x
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/sysfs-schemes.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index bf08e6e1f1635..300930c2c5b3f 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -914,8 +914,10 @@ static void damon_sysfs_scheme_filters_rm_dirs(
struct damon_sysfs_scheme_filter **filters_arr = filters->filters_arr;
int i;
- for (i = 0; i < filters->nr; i++)
+ for (i = 0; i < filters->nr; i++) {
+ kobject_del(&filters_arr[i]->kobj);
kobject_put(&filters_arr[i]->kobj);
+ }
filters->nr = 0;
kfree(filters_arr);
filters->filters_arr = NULL;
--
2.47.3
next prev parent reply other threads:[~2026-06-16 15:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 15:08 [RFC PATCH 0/9] mm/damon/sysfs: kobject_del() directories that users can create/remove SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 1/9] mm/damon/sysfs: kobject_del() target, context and kdamond dirs SeongJae Park
2026-06-16 15:25 ` sashiko-bot
2026-06-17 0:02 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 2/9] mm/damon/sysfs: kobject_del() region dirs SeongJae Park
2026-06-16 15:29 ` sashiko-bot
2026-06-17 0:18 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 3/9] mm/damon/sysfs-schemes: kobject_del() scheme dirs SeongJae Park
2026-06-16 15:27 ` sashiko-bot
2026-06-17 0:52 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 4/9] mm/damon/sysfs-schemes: kobject_del() scheme region dirs SeongJae Park
2026-06-16 15:25 ` sashiko-bot
2026-06-17 0:43 ` SeongJae Park
2026-06-16 15:08 ` SeongJae Park [this message]
2026-06-16 15:08 ` [RFC PATCH 6/9] mm/damon/sysfs-schemes: kobject_del() scheme quota goal dirs SeongJae Park
2026-06-16 15:27 ` sashiko-bot
2026-06-17 0:55 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 7/9] mm/damon/sysfs-schemes: kobject_del() scheme action destination dirs SeongJae Park
2026-06-16 15:34 ` sashiko-bot
2026-06-17 1:07 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 8/9] mm/damon/sysfs: kobject_del() probe filter dirs SeongJae Park
2026-06-16 15:27 ` sashiko-bot
2026-06-17 1:10 ` SeongJae Park
2026-06-16 15:08 ` [RFC PATCH 9/9] mm/damon/sysfs: kobject_del() probe dirs SeongJae Park
2026-06-16 15:24 ` sashiko-bot
2026-06-17 1:11 ` SeongJae Park
2026-06-17 1:15 ` [RFC PATCH 0/9] mm/damon/sysfs: kobject_del() directories that users can create/remove 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=20260616150844.88305-6-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 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.