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 data attribute probe directories by adding kobject_del() calls. Fixes: bf3ea3d30880 ("mm/damon/sysfs: implement probe dir") Signed-off-by: SJ Park --- mm/damon/sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c index 204aed6a3e5da..9f92ebdb28574 100644 --- a/mm/damon/sysfs.c +++ b/mm/damon/sysfs.c @@ -1137,6 +1137,7 @@ static void damon_sysfs_probes_rm_dirs( for (i = 0; i < probes->nr; i++) { damon_sysfs_probe_rm_dirs(probes_arr[i]); + kobject_del(&probes_arr[i]->kobj); kobject_put(&probes_arr[i]->kobj); } probes->nr = 0; -- 2.47.3