cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] kernfs: Fix UAF in PSI polling when open file is released
@ 2025-08-22  7:07 Chen Ridong
  2025-08-22  7:07 ` [PATCH v2 1/2] kernfs: Fix UAF in " Chen Ridong
  2025-08-22  7:07 ` [PATCH v2 2/2] cgroup/psi: Set of->priv to NULL upon file release Chen Ridong
  0 siblings, 2 replies; 11+ messages in thread
From: Chen Ridong @ 2025-08-22  7:07 UTC (permalink / raw)
  To: gregkh, tj, hannes, mkoutny, peterz, zhouchengming
  Cc: linux-kernel, cgroups, lujialin4, chenridong, libaokun1

From: Chen Ridong <chenridong@huawei.com>

This series fixes a use-after-free issue triggered when disabling and
enabling cgroup PSI.

---
v2:
 - Add kernfs_get_active_of() to safely acquire active references for
   kernfs open files suggested by Tj.
 - Split into two patches as suggested by Greg.

Chen Ridong (2):
  kernfs: Fix UAF in polling when open file is released
  cgroup/psi: Set of->priv to NULL upon file release

 fs/kernfs/file.c       | 58 +++++++++++++++++++++++++++---------------
 kernel/cgroup/cgroup.c |  1 +
 2 files changed, 39 insertions(+), 20 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-09-01  6:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  7:07 [PATCH v2 0/2] kernfs: Fix UAF in PSI polling when open file is released Chen Ridong
2025-08-22  7:07 ` [PATCH v2 1/2] kernfs: Fix UAF in " Chen Ridong
2025-08-22  7:47   ` Greg KH
2025-08-22 17:46   ` Tejun Heo
2025-08-23  0:23     ` Chen Ridong
2025-08-22  7:07 ` [PATCH v2 2/2] cgroup/psi: Set of->priv to NULL upon file release Chen Ridong
2025-08-22 17:48   ` Tejun Heo
2025-08-23  6:43     ` Greg KH
2025-08-25 17:32       ` Tejun Heo
2025-09-01  1:38         ` Chen Ridong
2025-09-01  6:06           ` Greg KH

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).