public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/damon/sysfs-schemes: fix use-after-free for [memcg_]path
@ 2026-04-23 15:02 SeongJae Park
  2026-04-23 15:02 ` [PATCH 1/2] mm/damon/sysfs-schemes: protect memcg_path kfree() with damon_sysfs_lock SeongJae Park
  2026-04-23 15:02 ` [PATCH 2/2] mm/damon/sysfs-schemes: protect path " SeongJae Park
  0 siblings, 2 replies; 3+ messages in thread
From: SeongJae Park @ 2026-04-23 15:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: SeongJae Park, # 6 . 16 . x, damon, linux-kernel, linux-mm

Reads of 'memcg_path' and 'path' files in DAMON sysfs interface could
race with their writes, results in use-after-free.  Fix those.

Changes from RFC
- rfc: https://lore.kernel.org/20260422144059.72000-1-sj@kernel.org
- Fix a typo in commit description.
- Drop RFC tag.
- Rebase to latest mm-hotfixes-unstable.
Changes from v2
- v2: https://lore.kernel.org/20260420125405.362137-1-qjx1298677004@gmail.com
- Split patch for individual fixes commits.
- Hand-off authorship to SJ, give Co-developed-by: to Junxi.
- Use mutex_trylock() instead of mutex_lock().
- Add RFC tag for Sashiko review round.
- Wordsmith commit messages.
Changes from v1
- v1: https://lore.kernel.org/20260420085332.178473-1-qjx1298677004@gmail.com
- Protect not only user-writes but also user-reads.

SeongJae Park (2):
  mm/damon/sysfs-schemes: protect memcg_path kfree() with
    damon_sysfs_lock
  mm/damon/sysfs-schemes: protect path kfree() with damon_sysfs_lock

 mm/damon/sysfs-schemes.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)


base-commit: 26232ccdfcc7029d92b633b01f5f22913ab72168
-- 
2.47.3

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

end of thread, other threads:[~2026-04-23 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 15:02 [PATCH 0/2] mm/damon/sysfs-schemes: fix use-after-free for [memcg_]path SeongJae Park
2026-04-23 15:02 ` [PATCH 1/2] mm/damon/sysfs-schemes: protect memcg_path kfree() with damon_sysfs_lock SeongJae Park
2026-04-23 15:02 ` [PATCH 2/2] mm/damon/sysfs-schemes: protect path " SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox