* [merged mm-stable] mm-shrinker-fix-name-consistency-issue-in-shrinker_debugfs_rename.patch removed from -mm tree
@ 2025-03-17 5:15 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-03-17 5:15 UTC (permalink / raw)
To: mm-commits, zhengqi.arch, roman.gushchin, muchun.song, david,
liuye, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]
The quilt patch titled
Subject: mm/shrinker: fix name consistency issue in shrinker_debugfs_rename()
has been removed from the -mm tree. Its filename was
mm-shrinker-fix-name-consistency-issue-in-shrinker_debugfs_rename.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Liu Ye <liuye@kylinos.cn>
Subject: mm/shrinker: fix name consistency issue in shrinker_debugfs_rename()
Date: Wed, 5 Mar 2025 15:17:59 +0800
After calling debugfs_change_name function, the return value should be
checked and the old name restored. If debugfs_change_name fails, the new
name memory should be freed. The effect is that the shrinker->name is not
consistent with the name displayed in debugfs.
Link: https://lkml.kernel.org/r/20250305071759.661055-1-liuye@kylinos.cn
Signed-off-by: Liu Ye <liuye@kylinos.cn>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Reviewed-by:Qi Zheng <zhengqi.arch@bytedance.co
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shrinker_debug.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/mm/shrinker_debug.c~mm-shrinker-fix-name-consistency-issue-in-shrinker_debugfs_rename
+++ a/mm/shrinker_debug.c
@@ -214,10 +214,14 @@ int shrinker_debugfs_rename(struct shrin
ret = debugfs_change_name(shrinker->debugfs_entry, "%s-%d",
shrinker->name, shrinker->debugfs_id);
+ if (ret) {
+ shrinker->name = old;
+ kfree_const(new);
+ } else {
+ kfree_const(old);
+ }
mutex_unlock(&shrinker_mutex);
- kfree_const(old);
-
return ret;
}
EXPORT_SYMBOL(shrinker_debugfs_rename);
_
Patches currently in -mm which might be from liuye@kylinos.cn are
mm-vmalloc-refactoring-function-__vmalloc_node_range_noprof.patch
mm-debug-add-line-breaks.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-17 5:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 5:15 [merged mm-stable] mm-shrinker-fix-name-consistency-issue-in-shrinker_debugfs_rename.patch removed from -mm tree Andrew Morton
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.