linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/damon: fix memory leak in memcg_path sysfs file
@ 2025-06-19 18:36 SeongJae Park
  2025-06-19 18:36 ` [PATCH 1/2] mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write SeongJae Park
  2025-06-19 18:36 ` [PATCH 2/2] selftets/damon: add a test for memcg_path leak SeongJae Park
  0 siblings, 2 replies; 3+ messages in thread
From: SeongJae Park @ 2025-06-19 18:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: SeongJae Park, Shuah Khan, damon, kernel-team, linux-kernel,
	linux-kselftest, linux-mm, stable, #, 6.3.x

Users can leak memory by repeatedly writing a string to DAMOS sysfs
memcg_path file.  Fix it (patch 1) and add a selftest (patch 2) to avoid
reoccurrance of the bug.

SeongJae Park (2):
  mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path
    on write
  selftets/damon: add a test for memcg_path leak

 mm/damon/sysfs-schemes.c                      |  1 +
 tools/testing/selftests/damon/Makefile        |  1 +
 .../selftests/damon/sysfs_memcg_path_leak.sh  | 43 +++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100755 tools/testing/selftests/damon/sysfs_memcg_path_leak.sh


base-commit: 05b89e828eb4f791f721cbdc65f36e1a8287a9d3
-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-19 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19 18:36 [PATCH 0/2] mm/damon: fix memory leak in memcg_path sysfs file SeongJae Park
2025-06-19 18:36 ` [PATCH 1/2] mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write SeongJae Park
2025-06-19 18:36 ` [PATCH 2/2] selftets/damon: add a test for memcg_path leak SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).