linux/mm/damon
SeongJae Park c637c61c9e mm/damon/sysfs-schemes: avoid Wformat-security warning on damon_sysfs_access_pattern_add_range_dir()
When -Wformat-security is given, compiler warns as a potential security
issue on damon_sysfs_access_pattern_add_range_dir() as below:

    mm/damon/sysfs-schemes.c: In function `damon_sysfs_access_pattern_add_range_dir':
    mm/damon/sysfs-schemes.c:1503:25: warning: format not a string literal and no format arguments [-Wformat-security]
     1503 |                         &access_pattern->kobj, name);
          |                         ^

Fix it by using "%s" as the format and the name as the argument.

Link: https://lkml.kernel.org/r/20250310165009.652491-1-sj@kernel.org
Fixes: 7e84b1f821 ("mm/damon/sysfs: support DAMON-based Operation Schemes")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-17 22:07:01 -07:00
..
tests mm/damon/core: make damon_set_attrs() be safe to be called from damon_call() 2025-03-17 22:06:54 -07:00
core.c mm/damon: remove damon_operations->reset_aggregated 2025-03-17 22:06:57 -07:00
Kconfig mm/damon: remove DAMON debugfs interface 2025-01-25 20:22:29 -08:00
lru_sort.c Revert "mm/damon/lru_sort: adjust local variable to dynamic allocation" 2024-09-09 16:39:00 -07:00
Makefile mm/damon: remove DAMON debugfs interface 2025-01-25 20:22:29 -08:00
modules-common.c mm/damon: update email of SeongJae 2023-12-20 14:48:13 -08:00
modules-common.h mm/damon/modules: deduplicate init steps for DAMON context setup 2022-11-30 15:01:26 -08:00
ops-common.c mm/damon/ops: have damon_get_folio return folio even for tail pages 2025-03-16 22:06:08 -07:00
ops-common.h mm/damon/ops-common: atomically test and clear young on ptes and pmds 2023-06-09 16:25:55 -07:00
paddr.c mm/damon: remove damon_operations->reset_aggregated 2025-03-17 22:06:57 -07:00
reclaim.c mm/damon: add 'allow' argument to damos_new_filter() 2025-01-25 20:22:32 -08:00
sysfs-common.c mm/damon/sysfs: make kobj_type structures constant 2023-02-09 16:51:45 -08:00
sysfs-common.h mm/damon/sysfs-schemes: expose per-region filter-passed bytes 2025-01-25 20:22:28 -08:00
sysfs-schemes.c mm/damon/sysfs-schemes: avoid Wformat-security warning on damon_sysfs_access_pattern_add_range_dir() 2025-03-17 22:07:01 -07:00
sysfs.c mm/damon/sysfs: remove damon_sysfs_cmd_request and its readers 2025-03-17 22:06:55 -07:00
vaddr.c mm/damon: remove damon_operations->reset_aggregated 2025-03-17 22:06:57 -07:00